We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a519333 commit 9d4e8fdCopy full SHA for 9d4e8fd
tests/pos/i3168.scala
@@ -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
tests/run/i3189.scala
@@ -0,0 +1,9 @@
+class Test[A](action: A => A) {
+ def this() = this(a => a)
+ def go(x: A) = action(x)
+object Test extends App {
+ assert(new Test[Int]().go(3) == 3)
0 commit comments