Commit 318228bb authored by uwdkl's avatar uwdkl

Add some invalid tests from the Rust team

parent c57d1d3d
class FirstMain {
public static void main(String[] args) {}
}
class AnotherMain {
public static void main(String[] args) {}
}
class IfElseTypeMismatch {
public static void main(String[] args) {
foo(true)
}
public int foo(boolean b) {
if (b) {
return 42;
} else {
return false;
}
}
}
class InvalidUnreachableCodeIsInvalid {
public static void main(String[] args) {
int x = 5;
return;
/* Unreachable code should still be checked */
boolean b = x;
}
}
class MissingMain {
int x;
public void foo() {}
}
class VoidField {
void foo;
public static void main(String[] args) {
}
}
class VoidParam {
public static void main(String[] args) { }
public void foo(void param) {}
}
class VoidVar {
public static void main(String[] args) {
void foo;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment