File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/dotty/tools/dotc/reporting/diagnostic
test/dotty/tools/dotc/reporting Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1842,7 +1842,9 @@ object messages {
18421842 case class OnlyFunctionsCanBeFollowedByUnderscore (pt : Type )(implicit ctx : Context )
18431843 extends Message (OnlyFunctionsCanBeFollowedByUnderscoreID ) {
18441844 val kind = " Syntax"
1845- val msg = hl " not a function: $pt; cannot be followed by `_' "
1846- val explanation = " "
1845+ val msg = hl " Not a function: $pt: cannot be followed by ${" _" }"
1846+ val explanation =
1847+ hl """ The syntax ${" x _" } is no longer supported if ${" x" } is not a function.
1848+ |To convert to a function value, you need to explicitly write ${" () => x" }"""
18471849 }
18481850}
Original file line number Diff line number Diff line change @@ -1066,9 +1066,7 @@ class ErrorMessagesTests extends ErrorMessagesTest {
10661066 implicit val ctx : Context = ictx
10671067
10681068 assertMessageCount(1 , messages)
1069-
10701069 val OnlyFunctionsCanBeFollowedByUnderscore (pt) :: Nil = messages
1071-
10721070 assertEquals(" String(n)" , pt.show)
10731071 }
10741072}
You can’t perform that action at this time.
0 commit comments