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

22 lines
297 B
Java
Raw Normal View History

2014-04-08 00:06:13 +00:00
/*** 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;
}
}