This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: FYI: new test case


One problem...

Tom Tromey wrote:
I'm checking this in.

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* libjava.lang/initexc.java: New file.
	* libjava.lang/initexc.out: New file.

+    static
+    {
+      throw new NullPointerException("nope");
+    }
Static initializers must be able to complete normally. This should be a compile failure. Should I open a PR?

For this test to work, rewrite it as

static
{
if (true)
throw new NullPointerException("nope");
}

--
This signature intentionally left boring.

Eric Blake ebb9@email.byu.edu
BYU student, free software programmer



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]