diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala b/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala index fb8a111da1..a0fec75fd2 100644 --- a/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala +++ b/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala @@ -67,7 +67,10 @@ abstract class SuperAccessors extends transform.Transform with transform.TypingT case t => t } acc setInfoAndEnter (tpe cloneInfo acc) - storeAccessorDefinition(clazz, DefDef(acc, EmptyTree)) + // Diagnostic for SI-7091 + if (!accDefs.contains(clazz)) + reporter.error(sel.pos, s"Internal error: unable to store accessor definition in ${clazz}. clazz.isPackage=${clazz.isPackage}. Accessor required for ${sel} (${showRaw(sel)})") + else storeAccessorDefinition(clazz, DefDef(acc, EmptyTree)) acc } |