@@ -591,7 +591,7 @@ object Semantic:
591
591
Hot
592
592
593
593
case fun : Fun =>
594
- report.error(" unexpected tree in selecting a function, fun = " + fun.expr.show, fun.expr)
594
+ report.error(" [Internal error] unexpected tree in selecting a function, fun = " + fun.expr.show, fun.expr)
595
595
Hot
596
596
597
597
case RefSet (refs) =>
@@ -839,7 +839,7 @@ object Semantic:
839
839
warm
840
840
841
841
case Fun (body, thisV, klass) =>
842
- report.error(" unexpected tree in instantiating a function, fun = " + body.show, trace.toVector.last)
842
+ report.error(" [Internal error] unexpected tree in instantiating a function, fun = " + body.show, trace.toVector.last)
843
843
Hot
844
844
845
845
case RefSet (refs) =>
@@ -859,7 +859,7 @@ object Semantic:
859
859
case Hot => Hot
860
860
case ref : Ref => ref.objekt.field(sym)
861
861
case _ =>
862
- report.error(" unexpected this value accessing local variable, sym = " + sym.show + " , thisValue = " + thisValue2.show, trace.toVector.last)
862
+ report.error(" [Internal error] unexpected this value accessing local variable, sym = " + sym.show + " , thisValue = " + thisValue2.show, trace.toVector.last)
863
863
Hot
864
864
else if sym.is(Flags .Param ) then
865
865
Hot
@@ -877,7 +877,7 @@ object Semantic:
877
877
case ref : Ref => eval(vdef.rhs, ref, enclosingClass)
878
878
879
879
case _ =>
880
- report.error(" unexpected this value when accessing local variable, sym = " + sym.show + " , thisValue = " + thisValue2.show, trace.toVector.last)
880
+ report.error(" [Internal error] unexpected this value when accessing local variable, sym = " + sym.show + " , thisValue = " + thisValue2.show, trace.toVector.last)
881
881
Hot
882
882
end match
883
883
@@ -1318,8 +1318,8 @@ object Semantic:
1318
1318
Hot
1319
1319
1320
1320
case _ =>
1321
- throw new Exception ( " unexpected tree: " + expr.show )
1322
-
1321
+ report.error( " [Internal error] unexpected tree" , expr)
1322
+ Hot
1323
1323
1324
1324
/** Handle semantics of leaf nodes */
1325
1325
def cases (tp : Type , thisV : Ref , klass : ClassSymbol ): Contextual [Value ] = log(" evaluating " + tp.show, printer, (_ : Value ).show) {
@@ -1347,7 +1347,8 @@ object Semantic:
1347
1347
Hot
1348
1348
1349
1349
case _ =>
1350
- throw new Exception (" unexpected type: " + tp)
1350
+ report.error(" [Internal error] unexpected type " + tp, trace.toVector.last)
1351
+ Hot
1351
1352
}
1352
1353
1353
1354
/** Resolve C.this that appear in `klass` */
@@ -1361,15 +1362,15 @@ object Semantic:
1361
1362
val obj = ref.objekt
1362
1363
val outerCls = klass.owner.lexicallyEnclosingClass.asClass
1363
1364
if ! obj.hasOuter(klass) then
1364
- val error = PromoteError (" outer not yet initialized, target = " + target + " , klass = " + klass + " , object = " + obj, trace.toVector)
1365
- report.error(error.show + error.stacktrace , trace.toVector.last)
1365
+ val error = PromoteError (" [Internal error] outer not yet initialized, target = " + target + " , klass = " + klass + " , object = " + obj, trace.toVector)
1366
+ report.error(error.show, trace.toVector.last)
1366
1367
Hot
1367
1368
else
1368
1369
resolveThis(target, obj.outer(klass), outerCls)
1369
1370
case RefSet (refs) =>
1370
1371
refs.map(ref => resolveThis(target, ref, klass)).join
1371
1372
case fun : Fun =>
1372
- report.warning( " unexpected thisV = " + thisV + " , target = " + target.show + " , klass = " + klass.show, trace.toVector.last)
1373
+ report.error( " [Internal error] unexpected thisV = " + thisV + " , target = " + target.show + " , klass = " + klass.show, trace.toVector.last)
1373
1374
Cold
1374
1375
case Cold => Cold
1375
1376
@@ -1397,14 +1398,14 @@ object Semantic:
1397
1398
resolveThis(target, thisV, cur)
1398
1399
1399
1400
case None =>
1400
- report.warning( " unexpected outerSelect, thisV = " + thisV + " , target = " + target.show + " , hops = " + hops, trace.toVector.last.srcPos)
1401
+ report.error( " [Internal error] unexpected outerSelect, thisV = " + thisV + " , target = " + target.show + " , hops = " + hops, trace.toVector.last.srcPos)
1401
1402
Cold
1402
1403
1403
1404
case RefSet (refs) =>
1404
1405
refs.map(ref => resolveOuterSelect(target, ref, hops)).join
1405
1406
1406
1407
case fun : Fun =>
1407
- report.warning( " unexpected thisV = " + thisV + " , target = " + target.show + " , hops = " + hops, trace.toVector.last.srcPos)
1408
+ report.error( " [Internal error] unexpected thisV = " + thisV + " , target = " + target.show + " , hops = " + hops, trace.toVector.last.srcPos)
1408
1409
Cold
1409
1410
1410
1411
case Cold => Cold
0 commit comments