Skip to content

Commit 9fab237

Browse files
SuperCl4sholhotak
authored andcommitted
Remove explain message
1 parent 2a6e409 commit 9fab237

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
@@ -3594,21 +3594,7 @@ final class NamedPatternNotApplicable(selectorType: Type)(using Context) extends
35943594
class UnnecessaryNN(reason: String, sourcePosition: SourcePosition)(using Context) extends SyntaxMsg(UnnecessaryNN) {
35953595
override def msg(using Context) = i"""Unnecessary .nn: $reason"""
35963596

3597-
override def explain(using Context) = {
3598-
val code1 = """val a: String = "foo".nn"""
3599-
val code2 = """val a: String = "foo""""
3600-
i"""With -Yexplicit-nulls, this happens when use apply .nn to a term that is already non-null.
3601-
|
3602-
|Example:
3603-
|
3604-
|$code1
3605-
|
3606-
|instead of
3607-
|
3608-
|$code2
3609-
|
3610-
|"""
3611-
}
3597+
override def explain(using Context) = ""
36123598

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

0 commit comments

Comments
 (0)