diff options
-rw-r--r-- | src/reflect/scala/reflect/internal/Definitions.scala | 6 | ||||
-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 |
5 files changed, 14 insertions, 2 deletions
diff --git a/src/reflect/scala/reflect/internal/Definitions.scala b/src/reflect/scala/reflect/internal/Definitions.scala index 02578e2038..f5662b47c2 100644 --- a/src/reflect/scala/reflect/internal/Definitions.scala +++ b/src/reflect/scala/reflect/internal/Definitions.scala @@ -904,12 +904,14 @@ trait Definitions extends api.StandardDefinitions { ) } - def EnumType(sym: Symbol) = + def EnumType(sym: Symbol) = { // given (in java): "class A { enum E { VAL1 } }" // - sym: the symbol of the actual enumeration value (VAL1) // - .owner: the ModuleClassSymbol of the enumeration (object E) // - .linkedClassOfClass: the ClassSymbol of the enumeration (class E) - sym.owner.linkedClassOfClass.tpe + // SI-6613 Subsequent runs of the resident compiler demand the phase discipline here. + enteringPhaseNotLaterThan(picklerPhase)(sym.owner.linkedClassOfClass).tpe + } /** Given a class symbol C with type parameters T1, T2, ... Tn * which have upper/lower bounds LB1/UB1, LB1/UB2, ..., LBn/UBn, 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 } } |