File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
64
64
import tpd .{cpy => _ , _ }
65
65
import untpd .cpy
66
66
import Dynamic .isDynamicMethod
67
+ import reporting .diagnostic .MessageCreator
67
68
import reporting .diagnostic .tpe ._
68
69
69
70
/** A temporary data item valid for a single typed ident:
@@ -97,7 +98,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
97
98
/** Method is necessary because error messages need to bind to
98
99
* to typedIdent's context which is lost in nested calls to findRef
99
100
*/
100
- def error (msg : => String , pos : Position ) = ctx.error (msg, pos)
101
+ def error (msg : => MessageCreator , pos : Position ) = ctx.explainError (msg, pos)
101
102
102
103
/** Is this import a root import that has been shadowed by an explicit
103
104
* import in the same program?
@@ -325,7 +326,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
325
326
if (rawType.exists)
326
327
ensureAccessible(rawType, superAccess = false , tree.pos)
327
328
else {
328
- error(em " not found: $ kind$ name" , tree.pos)
329
+ error(new MissingIdent (tree, kind, name) , tree.pos)
329
330
ErrorType
330
331
}
331
332
You can’t perform that action at this time.
0 commit comments