diff options
Diffstat (limited to 'src/dotty/tools/dotc/transform/TreeChecker.scala')
-rw-r--r-- | src/dotty/tools/dotc/transform/TreeChecker.scala | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/transform/TreeChecker.scala b/src/dotty/tools/dotc/transform/TreeChecker.scala index e7342aec9..4b3927ccf 100644 --- a/src/dotty/tools/dotc/transform/TreeChecker.scala +++ b/src/dotty/tools/dotc/transform/TreeChecker.scala @@ -396,6 +396,9 @@ class TreeChecker extends Phase with SymTransformer { override def typedBlock(tree: untpd.Block, pt: Type)(implicit ctx: Context) = withDefinedSyms(tree.stats) { super.typedBlock(tree, pt) } + override def typedInlined(tree: untpd.Inlined, pt: Type)(implicit ctx: Context) = + withDefinedSyms(tree.bindings) { super.typedInlined(tree, pt) } + /** Check that all defined symbols have legal owners. * An owner is legal if it is either the same as the context's owner * or there's an owner chain of valdefs starting at the context's owner and @@ -423,8 +426,9 @@ class TreeChecker extends Phase with SymTransformer { !isPrimaryConstructorReturn && !pt.isInstanceOf[FunProto]) assert(tree.tpe <:< pt, - s"error at ${sourcePos(tree.pos)}\n" + - err.typeMismatchStr(tree.tpe, pt) + "\ntree = " + tree) + i"""error at ${sourcePos(tree.pos)} + |${err.typeMismatchStr(tree.tpe, pt)} + |tree = $tree""") tree } } |