Skip to content

Commit db477ba

Browse files
committed
Remove explain message
1 parent e33b637 commit db477ba

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

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

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3556,21 +3556,7 @@ final class NamedPatternNotApplicable(selectorType: Type)(using Context) extends
35563556
class UnnecessaryNN(reason: String, sourcePosition: SourcePosition)(using Context) extends SyntaxMsg(UnnecessaryNN) {
35573557
override def msg(using Context) = i"""Unnecessary .nn: $reason"""
35583558

3559-
override def explain(using Context) = {
3560-
val code1 = """val a: String = "foo".nn"""
3561-
val code2 = """val a: String = "foo""""
3562-
i"""With -Yexplicit-nulls, this happens when use apply .nn to a term that is already non-null.
3563-
|
3564-
|Example:
3565-
|
3566-
|$code1
3567-
|
3568-
|instead of
3569-
|
3570-
|$code2
3571-
|
3572-
|"""
3573-
}
3559+
override def explain(using Context) = ""
35743560

35753561
private val nnSourcePosition = SourcePosition(sourcePosition.source, Span(sourcePosition.span.end, sourcePosition.span.end + 2, sourcePosition.span.end), sourcePosition.outer)
35763562

0 commit comments

Comments
 (0)