diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2012-09-09 14:10:53 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2012-09-09 14:10:53 +0200 |
commit | 6f78b501c226bd3c24c516801a23865531591ebe (patch) | |
tree | 23fb1b3ed1bb2434556edd5c6aed8f35cad49109 /test/files/neg | |
parent | b43b3b0ba8ac55ea9c1727b8a4c5e9ad5696fe6d (diff) | |
download | scala-6f78b501c226bd3c24c516801a23865531591ebe.tar.gz scala-6f78b501c226bd3c24c516801a23865531591ebe.tar.bz2 scala-6f78b501c226bd3c24c516801a23865531591ebe.zip |
More tests for SI-6335.
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t6335.check | 9 | ||||
-rw-r--r-- | test/files/neg/t6335.scala | 7 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/files/neg/t6335.check b/test/files/neg/t6335.check new file mode 100644 index 0000000000..1727a05eb2 --- /dev/null +++ b/test/files/neg/t6335.check @@ -0,0 +1,9 @@ +t6335.scala:6: error: method Z is defined twice + conflicting symbols both originated in file 't6335.scala' + implicit class Z[A](val i: A) { def zz = i } + ^ +t6335.scala:3: error: method X is defined twice + conflicting symbols both originated in file 't6335.scala' + implicit class X(val x: Int) { def xx = x } + ^ +two errors found diff --git a/test/files/neg/t6335.scala b/test/files/neg/t6335.scala new file mode 100644 index 0000000000..5c41e81ef5 --- /dev/null +++ b/test/files/neg/t6335.scala @@ -0,0 +1,7 @@ +object ImplicitClass { + def X(i: Int) {} + implicit class X(val x: Int) { def xx = x } + + def Z[A](i: A) {} + implicit class Z[A](val i: A) { def zz = i } +}
\ No newline at end of file |