Skip to content

Conversation

@eed3si9n
Copy link
Member

In #6325 (comment) @SethTisue reported that procedure syntax deprecation warnings are not displayed on REPL.

% /usr/local/scala/scala-2.13.0-M5/bin/scala -deprecation        
Welcome to Scala 2.13.0-M5 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_192).
Type in expressions for evaluation. Or try :help.

scala> def foo() { }
foo: ()Unit

This is because warnings were filtered out by withoutWarnings in #5647 to fix scala/bug#10130.
On 2.13.x, it seems to work ok without the withoutWarnings filter during parse.

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.
@scala-jenkins scala-jenkins added this to the 2.13.0-RC1 milestone Nov 27, 2018
Copy link
Contributor

@som-snytt som-snytt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! And the carets line up right! Note the parse trees are now spliced into the template, since the rebirth of REPL as Adriaanite.

@adriaanm
Copy link
Contributor

Thanks for the fix & review!

@adriaanm adriaanm merged commit 5e47362 into scala:2.13.x Nov 27, 2018
@eed3si9n eed3si9n deleted the wip/repl-warnings branch November 27, 2018 20:40
@som-snytt
Copy link
Contributor

Why did I have to joke about the caret lining up? The position is actually a bit weird.

scala> trait T { def f() }
                        ^
       warning: procedure syntax is deprecated: instead, add `: Unit` to explicitly declare `f`'s return type
defined trait T

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.

Multiple syntax warnings in REPL

4 participants