1
Fork 0
mini-java/miniJava/tests/pa3_tests/fail343.java

22 lines
297 B
Java

/*** incorrect type for argument of f(int)
* COMP 520
* Type checking
*/
class Fail43 {
public static void main(String[] args) {
A a = new A();
a.g();
}
}
class A{
public void g() {
int x = f(g());
}
public int f(int x) {
return 5;
}
}