diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2012-05-17 16:17:10 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2012-05-17 16:21:09 +0200 |
commit | c09bd7cbe853062853fab0692da1f54135fdbd38 (patch) | |
tree | 15549d73f72ac1ba2dbf86b5a47cab8dff2e274d /test | |
parent | 9fe251e16b93d4bdc8a496f3edce90ef2e207ee8 (diff) | |
download | scala-c09bd7cbe853062853fab0692da1f54135fdbd38.tar.gz scala-c09bd7cbe853062853fab0692da1f54135fdbd38.tar.bz2 scala-c09bd7cbe853062853fab0692da1f54135fdbd38.zip |
A band-aid solution for SI-5803.
Since ae5ff662, resetAttrs duplicates trees, which doesn't preserve ApplyConstructor.
My attempt to modify TreeCopier to do so proved trickier than expected.
In any case, ApplyConstructor is not long for this world, and is only used in tree printing
to distinguish `new X` from regular Apply trees, so this should suffice pending full surgery.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/t5803.check | 4 | ||||
-rw-r--r-- | test/files/neg/t5803.scala | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/test/files/neg/t5803.check b/test/files/neg/t5803.check new file mode 100644 index 0000000000..6a2de2e1df --- /dev/null +++ b/test/files/neg/t5803.check @@ -0,0 +1,4 @@ +t5803.scala:3: error: could not find implicit value for parameter ev: Nothing + new Foo(): String + ^ +one error found diff --git a/test/files/neg/t5803.scala b/test/files/neg/t5803.scala new file mode 100644 index 0000000000..f818272f86 --- /dev/null +++ b/test/files/neg/t5803.scala @@ -0,0 +1,4 @@ +object Test { + class Foo()(implicit ev: Nothing) + new Foo(): String +} |