Skip to content

Conversation

@som-snytt
Copy link
Contributor

Don't emit warnings when parsing to test for
complete input. The warnings will show up
in the templated code.

$ scala
Welcome to Scala 2.12.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_111).
Type in expressions for evaluation. Or try :help.

scala> '\060'
<console>:1: warning: Octal escape literals are deprecated, use \u0030 instead.
'\060'
 ^
<console>:2: warning: Octal escape literals are deprecated, use \u0030 instead.
'\060'
 ^
<console>:12: warning: Octal escape literals are deprecated, use \u0030 instead.
       '\060'
        ^
res0: Char = 0

scala> val then = 0
<console>:1: warning: then is a reserved word (since 2.10.0); usage as an identifier is deprecated
val then = 0
    ^
<console>:11: warning: then is a reserved word (since 2.10.0); usage as an identifier is deprecated
       val then = 0
           ^
then: Int = 0

scala> 'abc'
<console>:1: error: unclosed character literal
'abc'
    ^

scala> :quit
apm@mara:~/projects/scala$ ./build/pack/bin/scala -deprecation
Welcome to Scala 2.12.2-20170110-140852-827d69d (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_111).
Type in expressions for evaluation. Or try :help.

scala> '\060'
<console>:12: warning: Octal escape literals are deprecated, use \u0030 instead.
       '\060'
        ^
res0: Char = 0

scala> val then = 0
<console>:11: warning: then is a reserved word (since 2.10.0); usage as an identifier is deprecated
       val then = 0
           ^
then: Int = 0

scala> 'abc'
<console>:1: error: unclosed character literal
'abc'
    ^

scala> 

Don't emit warnings when parsing to test for
complete input. The warnings will show up
in the templated code.
@scala-jenkins scala-jenkins added this to the 2.12.2 milestone Jan 17, 2017
@adriaanm adriaanm merged commit 869416c into scala:2.12.x Feb 8, 2017
@som-snytt
Copy link
Contributor Author

Thanks! I guess I won't be able to push the PR queue into triple digits after all. I tried.

@som-snytt som-snytt deleted the issue/10130 branch February 8, 2017 03:16
@adriaanm
Copy link
Contributor

adriaanm commented Feb 8, 2017

It's not too late! However, we are back from our Canadian exile and slowly (glacierly?) getting over the 20/1 hangover...

@som-snytt
Copy link
Contributor Author

I only proposed PRs that can be reviewed while seeing double, because your job is hard enough already.

@adriaanm
Copy link
Contributor

adriaanm commented Feb 8, 2017 via email

eed3si9n added a commit to eed3si9n/scala that referenced this pull request Nov 27, 2018
In scala#6325 Seth reported that procedure syntax
deprecation warnings are not displayed on REPL.
This is because warnings were filtered out by `withoutWarnings` in scala#5647 to fix scala/bug#10130.
On 2.13.x, it seems to work ok without the `withoutWarnings` filter during parse.
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.

3 participants