File tree Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+
2+ public class C {
3+ public long f (long x , Long y ) { return x + y ; }
4+ public long f (Long x , Long y ) { return x + y ; }
5+
6+ public long g (long x , String y ) { return x + Long .parseLong (y ); }
7+ public long g (Long x , String y ) { return x + Long .parseLong (y ); }
8+
9+ public long h (long x ) { return x + 1 ; }
10+ public long h (Long x ) { return x + 1 ; }
11+ }
Original file line number Diff line number Diff line change 1+
2+ import java .lang .{Long => JLong }
3+
4+ class D {
5+ def f (x : Long , y : JLong ): Long = x + y
6+ def f (x : JLong , y : JLong ): Long = x + y
7+ }
Original file line number Diff line number Diff line change 1+
2+ object Test extends App {
3+ val c = new C
4+ val d = new D
5+
6+ println(c.f(42 , 42 ))
7+ println(c.f(42L , 42L ))
8+
9+ println(c.g(42 , " 42" ))
10+ println(c.g(42L , " 42" ))
11+
12+ println(c.h(42 ))
13+ println(c.h(42L ))
14+
15+ println(d.f(42 , 42 ))
16+ println(d.f(42L , 42L ))
17+ }
You can’t perform that action at this time.
0 commit comments