@@ -745,7 +745,7 @@ object Semantic {
745
745
746
746
case Cold => Result (Cold , Nil )
747
747
748
- case ref : Ref => eval(vdef.rhs, ref, klass )
748
+ case ref : Ref => eval(vdef.rhs, ref, enclosingClass )
749
749
750
750
case _ =>
751
751
report.error(" unexpected defTree when accessing local variable, sym = " + sym.show + " , defTree = " + sym.defTree.show, source)
@@ -992,7 +992,7 @@ object Semantic {
992
992
*
993
993
* This method only handles cache logic and delegates the work to `cases`.
994
994
*/
995
- def eval (expr : Tree , thisV : Ref , klass : ClassSymbol , cacheResult : Boolean = false ): Contextual [Result ] = log(" evaluating " + expr.show + " , this = " + thisV.show, printer, (_ : Result ).show) {
995
+ def eval (expr : Tree , thisV : Ref , klass : ClassSymbol , cacheResult : Boolean = false ): Contextual [Result ] = log(" evaluating " + expr.show + " , this = " + thisV.show + " in " + klass.show , printer, (_ : Result ).show) {
996
996
if (cache.contains(thisV, expr)) Result (cache(thisV, expr), Errors .empty)
997
997
else cache.assume(thisV, expr, cacheResult) { cases(expr, thisV, klass) }
998
998
}
@@ -1237,7 +1237,7 @@ object Semantic {
1237
1237
val obj = ref.objekt
1238
1238
val outerCls = klass.owner.lexicallyEnclosingClass.asClass
1239
1239
if ! obj.hasOuter(klass) then
1240
- val error = PromoteError (" outer not yet initialized, target = " + target + " , klass = " + klass, source, trace.toVector)
1240
+ val error = PromoteError (" outer not yet initialized, target = " + target + " , klass = " + klass + " , object = " + obj , source, trace.toVector)
1241
1241
report.error(error.show + error.stacktrace, source)
1242
1242
Hot
1243
1243
else
0 commit comments