Skip to content

Commit a0e3189

Browse files
committed
Add test case
- also rework previous test of #3189 to be a run test, just to make sure the problem is solved.
1 parent 5271e37 commit a0e3189

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

tests/pos/i3168.scala

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
object Test {
2+
class C {
3+
def foo(x: Int) = 1
4+
def foo(x: Double) = 2
5+
}
6+
7+
implicit class COps(val x: C) {
8+
def foo(x: String) = 3
9+
}
10+
11+
def test: Unit = {
12+
(new C).foo("Hello")
13+
}
14+
}

tests/pos/i3189.scala

Lines changed: 0 additions & 3 deletions
This file was deleted.

tests/run/i3189.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
class Test[A](action: A => A) {
2+
def this() = this(a => a)
3+
def go(x: A) = action(x)
4+
}
5+
6+
object Test extends App {
7+
assert(new Test[Int]().go(3) == 3)
8+
}
9+

0 commit comments

Comments
 (0)