Skip to content

Commit 5780ff5

Browse files
committed
Better classification of message kinds
1 parent 6307588 commit 5780ff5

25 files changed

+272
-2254
lines changed

compiler/src/dotty/tools/dotc/reporting/messages.scala

Lines changed: 199 additions & 316 deletions
Large diffs are not rendered by default.

compiler/src/dotty/tools/dotc/typer/Applications.scala

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import collection.mutable
2828
import config.Printers.{overload, typr, unapp}
2929
import TypeApplications._
3030

31-
import reporting.messages.{UnexpectedPatternForSummonFrom, NotAMember, MissingIdent, TypeMismatch}
31+
import reporting.messages.{UnexpectedPatternForSummonFrom, NotFoundMsg, TypeMismatch}
3232
import reporting.{trace, Message}
3333
import Constants.{Constant, IntTag, LongTag}
3434
import dotty.tools.dotc.reporting.messages.{UnapplyInvalidReturnType, NotAnExtractor, UnapplyInvalidNumberOfArguments}
@@ -1064,10 +1064,7 @@ trait Applications extends Compatibility {
10641064
state.reporter.pendingMessages match
10651065
case msg :: Nil =>
10661066
msg.contained match
1067-
case msg: NotAMember =>
1068-
memberName.isEmpty || msg.name == memberName
1069-
case msg: MissingIdent =>
1070-
memberName.isEmpty || msg.name == memberName
1067+
case msg: NotFoundMsg => memberName.isEmpty || msg.name == memberName
10711068
case _ => false
10721069
case _ => false
10731070

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ class Typer extends Namer
451451
// of a this(...) constructor call
452452
errorType(ex"$tree is not accessible from constructor arguments", tree.sourcePos)
453453
else
454-
errorType(new MissingIdent(tree, kind, name), tree.sourcePos)
454+
errorType(MissingIdent(tree, kind, name), tree.sourcePos)
455455

456456
val tree1 = ownType match {
457457
case ownType: NamedType =>

0 commit comments

Comments
 (0)