summaryrefslogtreecommitdiff
path: root/test/files/pos/t5877b.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2012-12-04 11:24:30 +0100
committerJason Zaugg <jzaugg@gmail.com>2012-12-04 11:29:38 +0100
commit96e5c402a6d48de699fe48cd0eaf33d0575eaac7 (patch)
tree08641a42671c5e9effb5d44b954079891560c7f9 /test/files/pos/t5877b.scala
parent65c1ae52799587a1de462419ce8c330ddf58193d (diff)
downloadscala-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/t5877b.scala')
-rw-r--r--test/files/pos/t5877b.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/files/pos/t5877b.scala b/test/files/pos/t5877b.scala
new file mode 100644
index 0000000000..6b8cbd473e
--- /dev/null
+++ b/test/files/pos/t5877b.scala
@@ -0,0 +1,13 @@
+package foo
+
+class Foo
+
+object Test {
+ new Foo().huzzah
+}
+
+object `package` {
+ implicit class PimpedFoo2(value: Foo) {
+ def huzzah = ""
+ }
+}