diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2012-12-04 11:24:30 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2012-12-04 11:29:38 +0100 |
commit | 96e5c402a6d48de699fe48cd0eaf33d0575eaac7 (patch) | |
tree | 08641a42671c5e9effb5d44b954079891560c7f9 /test/files/pos/t5877.scala | |
parent | 65c1ae52799587a1de462419ce8c330ddf58193d (diff) | |
download | scala-96e5c402a6d48de699fe48cd0eaf33d0575eaac7.tar.gz scala-96e5c402a6d48de699fe48cd0eaf33d0575eaac7.tar.bz2 scala-96e5c402a6d48de699fe48cd0eaf33d0575eaac7.zip |
SI-5877 Support implicit classes in package objects
This used to crash, as both the package and the package object
had the synthetic method in `decls`, and the typer tried to add
the tree to both places.
Now, synthetics in the package object are excluded from the pacakge
itself.
Diffstat (limited to 'test/files/pos/t5877.scala')
-rw-r--r-- | test/files/pos/t5877.scala | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/files/pos/t5877.scala b/test/files/pos/t5877.scala new file mode 100644 index 0000000000..c7827df99f --- /dev/null +++ b/test/files/pos/t5877.scala @@ -0,0 +1,14 @@ +package foo { + class Foo + + object Test { + new Foo().huzzah + } +} + +package object foo { + // Crasher: No synthetics for method PimpedFoo2: synthetics contains + implicit class PimpedFoo2(value: Foo) { + def huzzah = "" + } +} |