Skip to content

Commit 44bbcdf

Browse files
authored
Regression test (#25685)
Fixes #15881 Regression test for #18201
2 parents 2935ff9 + 348ceef commit 44bbcdf

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

tests/pos/i15881/J.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
public abstract class J {
2+
public abstract int f(int i);
3+
}

tests/pos/i15881/K.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
public interface K {
2+
int f(int i);
3+
}

tests/pos/i15881/s.scala

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
class C {
2+
def f(j: J): Int = j.f(42)
3+
def g(k: K): Int = k.f(17)
4+
}
5+
object Test extends App {
6+
def bump(i: Int): Int = i + 1
7+
val c = new C
8+
println {(
9+
c.f((i: Int) => i + 1),
10+
c.g((i: Int) => i + 1),
11+
c.f(bump),
12+
c.g(bump),
13+
)}
14+
}

0 commit comments

Comments
 (0)