Commit a4b6e13a authored by ucifm's avatar ucifm
Browse files

added semantic tests of group 5

parent 06736cad
Pipeline #177366 failed with stage
in 10 minutes and 13 seconds
/* This should fail because there are multiple public static methods. */
class Main {
public static void main(String[] args) {
}
public static void foo(String[] args) {
}
}
/* This should fail because System.out.println can only take integers as arguments */
class Main {
public static void main(String[] args) {
System.out.println(args[0]);
}
}
/* OK */
class Main {
public String y;
public String foo(String arg) {
y = arg;
return foo(arg);
}
public static void main(String[] args) {
Main m = new Main();
String x = m.foo(null);
m.foo(x);
}
}
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