aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-09-16 22:08:15 +0200
committerFelix Mulder <felix.mulder@gmail.com>2016-10-10 13:25:34 +0200
commit5c243778279d8b258d7b1d34dd5146dff07eb437 (patch)
treec84821c2a159444c7622c8a463a7fd97ad52de7c /src/dotty/tools/dotc/typer/Typer.scala
parent30b54109e3f535b417249057c2a548808082e06b (diff)
downloaddotty-5c243778279d8b258d7b1d34dd5146dff07eb437.tar.gz
dotty-5c243778279d8b258d7b1d34dd5146dff07eb437.tar.bz2
dotty-5c243778279d8b258d7b1d34dd5146dff07eb437.zip
Add `MissingIdent` message to `Typer`
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index 32d5e0d96..b29254b89 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -65,6 +65,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
import tpd.{cpy => _, _}
import untpd.cpy
import Dynamic.isDynamicMethod
+ import reporting.diagnostic.MessageCreator
import reporting.diagnostic.tpe._
/** A temporary data item valid for a single typed ident:
@@ -98,7 +99,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
/** Method is necessary because error messages need to bind to
* to typedIdent's context which is lost in nested calls to findRef
*/
- def error(msg: => String, pos: Position) = ctx.error(msg, pos)
+ def error(msg: => MessageCreator, pos: Position) = ctx.explainError(msg, pos)
/** Is this import a root import that has been shadowed by an explicit
* import in the same program?
@@ -330,7 +331,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
if (rawType.exists)
ensureAccessible(rawType, superAccess = false, tree.pos)
else {
- error(em"not found: $kind$name", tree.pos)
+ error(new MissingIdent(tree, kind, name), tree.pos)
ErrorType
}