File tree 1 file changed +6
-4
lines changed
compiler/src/dotty/tools/dotc/transform/init
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -298,8 +298,9 @@ class Objects {
298
298
val rhs = target.defTree.asInstanceOf [ValOrDefDef ].rhs
299
299
eval(rhs, addr, target.owner.asClass, cacheResult = true )
300
300
301
- case _ : Fun =>
302
- ???
301
+ case fun : Fun =>
302
+ report.error(" unexpected tree in select a function, fun = " + fun.expr.show, source)
303
+ Result (Bottom , Nil )
303
304
304
305
case RefSet (refs) =>
305
306
val resList = refs.map(_.select(field, source))
@@ -429,8 +430,9 @@ class Objects {
429
430
val res = addr.call(ctor, args, superType = NoType , source)
430
431
Result (addr, res.errors)
431
432
432
- case _ : Fun =>
433
- ??? // impossible
433
+ case fun : Fun =>
434
+ report.error(" unexpected tree in instantiate a function, fun = " + fun.expr.show, source)
435
+ Result (Bottom , Nil )
434
436
435
437
case RefSet (refs) =>
436
438
val resList = refs.map(_.instantiate(klass, ctor, args, source))
You can’t perform that action at this time.
0 commit comments