diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-05-03 11:47:03 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-05-06 16:18:46 +0200 |
commit | 20010624fe079297ae9039d9b31efbcfa7483bf0 (patch) | |
tree | 7d2ccbfe1b26cc3f55254e27d9c5d18ba08feb55 /src | |
parent | a0dd4ca40f6e7fd2d1e594b6580aa329f78e9768 (diff) | |
download | dotty-20010624fe079297ae9039d9b31efbcfa7483bf0.tar.gz dotty-20010624fe079297ae9039d9b31efbcfa7483bf0.tar.bz2 dotty-20010624fe079297ae9039d9b31efbcfa7483bf0.zip |
Better error message if position of tree isn't set.
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/typer/Typer.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index 165ae70dd..e4acff536 100644 --- a/src/dotty/tools/dotc/typer/Typer.scala +++ b/src/dotty/tools/dotc/typer/Typer.scala @@ -956,7 +956,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit } def typed(tree: untpd.Tree, pt: Type = WildcardType)(implicit ctx: Context): Tree = /*>|>*/ ctx.traceIndented (i"typing $tree", typr, show = true) /*<|<*/ { - if (!tree.isEmpty && ctx.typerState.isGlobalCommittable) assert(tree.pos.exists, tree) + if (!tree.isEmpty && ctx.typerState.isGlobalCommittable) assert(tree.pos.exists, i"position not set for $tree") try adapt(typedUnadapted(tree, pt), pt) catch { case ex: CyclicReference => errorTree(tree, cyclicErrorMsg(ex)) |