From 44807a78522fdbc770ec9dbb56b6c8f7614f13b1 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Thu, 9 Oct 2014 10:03:24 +1000 Subject: 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. --- test/files/res/t6613/Broken.scala | 1 + test/files/res/t6613/Enummy.java | 1 + 2 files changed, 2 insertions(+) create mode 100644 test/files/res/t6613/Broken.scala create mode 100644 test/files/res/t6613/Enummy.java (limited to 'test/files/res/t6613') 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 } } -- cgit v1.2.3