Skip to content

Commit 1586531

Browse files
committed
Better classification of message kinds
1 parent e2627ac commit 1586531

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}
@@ -1068,10 +1068,7 @@ trait Applications extends Compatibility {
10681068
state.reporter.pendingMessages match
10691069
case msg :: Nil =>
10701070
msg.contained match
1071-
case msg: NotAMember =>
1072-
memberName.isEmpty || msg.name == memberName
1073-
case msg: MissingIdent =>
1074-
memberName.isEmpty || msg.name == memberName
1071+
case msg: NotFoundMsg => memberName.isEmpty || msg.name == memberName
10751072
case _ => false
10761073
case _ => false
10771074

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

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

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

0 commit comments

Comments
 (0)