diff options
author | Paul Phillips <paulp@improving.org> | 2012-05-03 09:30:16 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-05-03 10:53:02 -0700 |
commit | ca74659bb06611b87474ffe2fd17b131cd3d34b0 (patch) | |
tree | be3664d400a0b534c1936555b660264ca4c9931d /test/files/neg | |
parent | 8068e1208466ab17af40c2670230ba5ac9704e0c (diff) | |
download | scala-ca74659bb06611b87474ffe2fd17b131cd3d34b0.tar.gz scala-ca74659bb06611b87474ffe2fd17b131cd3d34b0.tar.bz2 scala-ca74659bb06611b87474ffe2fd17b131cd3d34b0.zip |
Hardening implicit classes.
Closes SI-5728.
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t5728.check | 4 | ||||
-rw-r--r-- | test/files/neg/t5728.scala | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/test/files/neg/t5728.check b/test/files/neg/t5728.check new file mode 100644 index 0000000000..14f9c42ae0 --- /dev/null +++ b/test/files/neg/t5728.check @@ -0,0 +1,4 @@ +t5728.scala:3: error: implicit classes must accept exactly one primary constructor parameter + implicit class Foo + ^ +one error found diff --git a/test/files/neg/t5728.scala b/test/files/neg/t5728.scala new file mode 100644 index 0000000000..99337d06d4 --- /dev/null +++ b/test/files/neg/t5728.scala @@ -0,0 +1,7 @@ +object Test { + + implicit class Foo + + implicit def Foo = new Foo + +} |