Skip to content

Commit 2001062

Browse files
committed
Better error message if position of tree isn't set.
1 parent a0dd4ca commit 2001062

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
956956
}
957957

958958
def typed(tree: untpd.Tree, pt: Type = WildcardType)(implicit ctx: Context): Tree = /*>|>*/ ctx.traceIndented (i"typing $tree", typr, show = true) /*<|<*/ {
959-
if (!tree.isEmpty && ctx.typerState.isGlobalCommittable) assert(tree.pos.exists, tree)
959+
if (!tree.isEmpty && ctx.typerState.isGlobalCommittable) assert(tree.pos.exists, i"position not set for $tree")
960960
try adapt(typedUnadapted(tree, pt), pt)
961961
catch {
962962
case ex: CyclicReference => errorTree(tree, cyclicErrorMsg(ex))

0 commit comments

Comments
 (0)