Skip to content

Conversation

@som-snytt
Copy link
Contributor

Previously, user input was re-parsed embedded in a template.
Also strip the marker for extended explanations.

scala> List(1) map (42 +) ; List(1) map (42 +)
                       ^
       error: postfix operator + needs to be enabled
       by making the implicit value scala.language.postfixOps visible.
       This can be achieved by adding the import clause 'import
scala.language.postfixOps'
       or by setting the compiler option -language:postfixOps.
       See the Scaladoc for value scala.language.postfixOps for a
discussion
       why the feature needs to be explicitly enabled.
                                            ^
       error: postfix operator + needs to be enabled
       by making the implicit value scala.language.postfixOps visible.

scala> def f() { }
               ^
       warning: procedure syntax is deprecated: instead, add `: Unit =`
to explicitly declare `f`'s return type
error: No warnings can be incurred under -Xfatal-warnings.

scala>

Fixes scala/bug#11278

Previously, user input was re-parsed embedded in a template.
Also strip the marker for extended explanations.

```
scala> List(1) map (42 +) ; List(1) map (42 +)
                       ^
       error: postfix operator + needs to be enabled
       by making the implicit value scala.language.postfixOps visible.
       This can be achieved by adding the import clause 'import
scala.language.postfixOps'
       or by setting the compiler option -language:postfixOps.
       See the Scaladoc for value scala.language.postfixOps for a
discussion
       why the feature needs to be explicitly enabled.
                                            ^
       error: postfix operator + needs to be enabled
       by making the implicit value scala.language.postfixOps visible.

scala> def f() { }
               ^
       warning: procedure syntax is deprecated: instead, add `: Unit =`
to explicitly declare `f`'s return type
error: No warnings can be incurred under -Xfatal-warnings.

scala>
```
@scala-jenkins scala-jenkins added this to the 2.13.0-RC1 milestone Dec 1, 2018
@SethTisue
Copy link
Member

merging, because not having this is driving my OCD crazy. hey REPL, I just used procedure syntax right inside you, and you're not arresting me?

@SethTisue SethTisue merged commit 853a519 into scala:2.13.x Dec 4, 2018
@som-snytt som-snytt deleted the issue/11278 branch December 4, 2018 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Repl parse warnings not fatal enough

3 participants