Skip to content

Commit d5c6801

Browse files
author
som-snytt
authored
Merge pull request scala#10840 from som-snytt/issue/10532
Regression test for bug 10532
2 parents daf20d7 + cd9feed commit d5c6801

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

test/files/pos/t10532/C.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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+
}

test/files/pos/t10532/D.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
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+
}

test/files/pos/t10532/test.scala

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
}

0 commit comments

Comments
 (0)