File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
compiler/src/dotty/tools/dotc/transform/init Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -298,8 +298,9 @@ class Objects {
298298 val rhs = target.defTree.asInstanceOf [ValOrDefDef ].rhs
299299 eval(rhs, addr, target.owner.asClass, cacheResult = true )
300300
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 )
303304
304305 case RefSet (refs) =>
305306 val resList = refs.map(_.select(field, source))
@@ -429,8 +430,9 @@ class Objects {
429430 val res = addr.call(ctor, args, superType = NoType , source)
430431 Result (addr, res.errors)
431432
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 )
434436
435437 case RefSet (refs) =>
436438 val resList = refs.map(_.instantiate(klass, ctor, args, source))
You can’t perform that action at this time.
0 commit comments