diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/t3006.check | 6 | ||||
-rwxr-xr-x | test/files/neg/t3006.scala | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/files/neg/t3006.check b/test/files/neg/t3006.check new file mode 100644 index 0000000000..9a90d32b28 --- /dev/null +++ b/test/files/neg/t3006.check @@ -0,0 +1,6 @@ +t3006.scala:8: error: type mismatch; + found : java.lang.String("H") + required: Int + println(A(3) + "H") + ^ +one error found diff --git a/test/files/neg/t3006.scala b/test/files/neg/t3006.scala new file mode 100755 index 0000000000..f476c1717d --- /dev/null +++ b/test/files/neg/t3006.scala @@ -0,0 +1,10 @@ +object Test extends Application { + case class A(x: Int); + + class Foo(a: A) { println("Foo created!"); def +(x: Int) = new A(this.a.x + x); } + + implicit def aToFoo(x: A) = new Foo(x); + + println(A(3) + "H") + +} |