diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-10-09 10:03:24 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-10-09 10:11:54 +1000 |
commit | 44807a78522fdbc770ec9dbb56b6c8f7614f13b1 (patch) | |
tree | 16544ef6005d04fa3f3113e1e0c7444f5f41bd0a /test | |
parent | 9a8703450b09d5a671132865d3c26f64c3c2cfdf (diff) | |
download | scala-44807a78522fdbc770ec9dbb56b6c8f7614f13b1.tar.gz scala-44807a78522fdbc770ec9dbb56b6c8f7614f13b1.tar.bz2 scala-44807a78522fdbc770ec9dbb56b6c8f7614f13b1.zip |
SI-6613 Make Java enums work in FSC / REPL
We needed to hop from the enum's owner to its companion
module in an early phase of the compiler.
The enclosed test used to fail when this lookup returned
NoSymbol on the second run of the resident compiler when
triggered from `MixinTransformer`: the lookup didn't work
after the flatten info transform. This is related to the
fact that module classes are flattened into the enclosing
package, but module accessors remain in the enclosing class.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/res/t6613.check | 5 | ||||
-rw-r--r-- | test/files/res/t6613.res | 3 | ||||
-rw-r--r-- | test/files/res/t6613/Broken.scala | 1 | ||||
-rw-r--r-- | test/files/res/t6613/Enummy.java | 1 |
4 files changed, 10 insertions, 0 deletions
diff --git a/test/files/res/t6613.check b/test/files/res/t6613.check new file mode 100644 index 0000000000..bbd9331b16 --- /dev/null +++ b/test/files/res/t6613.check @@ -0,0 +1,5 @@ + +nsc> +nsc> +nsc> +nsc> diff --git a/test/files/res/t6613.res b/test/files/res/t6613.res new file mode 100644 index 0000000000..e3fa000fdd --- /dev/null +++ b/test/files/res/t6613.res @@ -0,0 +1,3 @@ +t6613/Enummy.java +t6613/Broken.scala +t6613/Broken.scala diff --git a/test/files/res/t6613/Broken.scala b/test/files/res/t6613/Broken.scala new file mode 100644 index 0000000000..9bcd12dbe1 --- /dev/null +++ b/test/files/res/t6613/Broken.scala @@ -0,0 +1 @@ +class Broken() { def broken() = Enummy.Broke.CHIP } diff --git a/test/files/res/t6613/Enummy.java b/test/files/res/t6613/Enummy.java new file mode 100644 index 0000000000..1863ef1297 --- /dev/null +++ b/test/files/res/t6613/Enummy.java @@ -0,0 +1 @@ +public class Enummy { public enum Broke { SHARD, CHIP } } |