diff options
author | Paul Phillips <paulp@improving.org> | 2011-08-06 14:24:59 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-08-06 14:24:59 +0000 |
commit | ead69ed24557ff42966a2bd5f71b6434ac5343b6 (patch) | |
tree | a908dcd39aa2707c1a745cd84031e2366c170633 /test | |
parent | 4f4a80ad5b85ce3922c80bbc9524f2540918187e (diff) | |
download | scala-ead69ed24557ff42966a2bd5f71b6434ac5343b6.tar.gz scala-ead69ed24557ff42966a2bd5f71b6434ac5343b6.tar.bz2 scala-ead69ed24557ff42966a2bd5f71b6434ac5343b6.zip |
Disallowed implicit modifier on auxiliary const...
Disallowed implicit modifier on auxiliary constructors, since it either
silently accomplishes nothing or crashes the compiler. If it should do
something useful let me know. Closes SI-4882, review by odersky.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/bug4882.check | 4 | ||||
-rw-r--r-- | test/files/neg/bug4882.scala | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/test/files/neg/bug4882.check b/test/files/neg/bug4882.check new file mode 100644 index 0000000000..2987cabe7f --- /dev/null +++ b/test/files/neg/bug4882.check @@ -0,0 +1,4 @@ +bug4882.scala:2: error: `implicit' modifier not allowed for constructors + implicit def this(a: String) = this(a.toInt) + ^ +one error found diff --git a/test/files/neg/bug4882.scala b/test/files/neg/bug4882.scala new file mode 100644 index 0000000000..4e58ef7879 --- /dev/null +++ b/test/files/neg/bug4882.scala @@ -0,0 +1,3 @@ +class Foo(value: Int) { + implicit def this(a: String) = this(a.toInt) +} |