diff options
author | Martin Odersky <odersky@gmail.com> | 2010-03-08 13:40:32 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2010-03-08 13:40:32 +0000 |
commit | 7144b4990f2c90002286ebf31a395c36024adcd2 (patch) | |
tree | a44fdf2e6af976bf54db36b596216b768e083a2c /test/files/neg | |
parent | aff35a066a44b32ec343efe46c013424468cc6b4 (diff) | |
download | scala-7144b4990f2c90002286ebf31a395c36024adcd2.tar.gz scala-7144b4990f2c90002286ebf31a395c36024adcd2.tar.bz2 scala-7144b4990f2c90002286ebf31a395c36024adcd2.zip |
Closes #3115. Reviw by rytz
Diffstat (limited to 'test/files/neg')
-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") + +} |