--- /dev/null
+
+blahblahpackage pack;public class C { public static void main(String[]argv) {}}
--- /dev/null
+
+public class C2 {
+
+ public void foo() {
+ i cant be bothered to fill this in!
+ }
+
+ public static void main(String[]argv) {
+
+ }
+}
--- /dev/null
+import java.lang.reflect.Method;
+
+public class Invoker {
+ public static void main(String[] args) throws Throwable {
+ try {
+ C.main(null);
+ } catch (Throwable t) {
+ boolean failedCorrectly = t.toString().indexOf("Unresolved compilation")!=-1;
+ if (failedCorrectly) return;
+ throw t;
+ }
+ throw new RuntimeException("Call to main should have failed!");
+ }
+}
\ No newline at end of file
--- /dev/null
+import java.lang.reflect.Method;
+
+public class Invoker2 {
+ public static void main(String[] args) throws Throwable {
+ C2.main(null); // C2.main() isnt broken but C2.foo() is
+ }
+}
\ No newline at end of file
--- /dev/null
+public class C {
+ public static void main(String[] argv) {
+ }
+
+ public void foo() {
+ I is busted
+ }
+}
--- /dev/null
+public class C {
+ public static void main(String[] argv) {
+ }
+
+ public void foo() {
+// I is busted
+ }
+}
--- /dev/null
+public class C {
+ public static void main(String[] argv) {
+ }
+
+ public void foo() {
+ I is busted
+ }
+}