Permalink
Browse files

SI-7091 Add a diagnostic for the "no acc def buf" error.

  • Loading branch information...
retronym committed Feb 10, 2013
1 parent 23b69c1 commit 2e8ede532a3af72abd22fc6c27af652c2a7206ae
Showing with 4 additions and 1 deletion.
  1. +4 −1 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
}

0 comments on commit 2e8ede5

Please sign in to comment.