aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2014-05-03 11:47:03 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-05-06 16:18:46 +0200
commit20010624fe079297ae9039d9b31efbcfa7483bf0 (patch)
tree7d2ccbfe1b26cc3f55254e27d9c5d18ba08feb55 /src/dotty/tools/dotc/typer/Typer.scala
parenta0dd4ca40f6e7fd2d1e594b6580aa329f78e9768 (diff)
downloaddotty-20010624fe079297ae9039d9b31efbcfa7483bf0.tar.gz
dotty-20010624fe079297ae9039d9b31efbcfa7483bf0.tar.bz2
dotty-20010624fe079297ae9039d9b31efbcfa7483bf0.zip
Better error message if position of tree isn't set.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala2
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))