forked from scala/scala
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate procedure syntax unconditionally
Procedure syntax was deprecated under -Xfuture flag in scala#3076. This deprecates it unconditionally, and drops it under -Xsource:2.14. See scala/bug#7605
- Loading branch information
Showing
9 changed files
with
44 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
procedure-deprecation.scala:2: warning: procedure syntax is deprecated: instead, add `: Unit =` to explicitly declare `bar`'s return type | ||
def bar {} | ||
^ | ||
procedure-deprecation.scala:3: warning: procedure syntax is deprecated: instead, add `: Unit` to explicitly declare `baz`'s return type | ||
def baz | ||
^ | ||
procedure-deprecation.scala:4: warning: procedure syntax is deprecated: instead, add `: Unit` to explicitly declare `boo`'s return type | ||
def boo(i: Int, l: Long) | ||
^ | ||
procedure-deprecation.scala:5: warning: procedure syntax is deprecated: instead, add `: Unit =` to explicitly declare `boz`'s return type | ||
def boz(i: Int, l: Long) {} | ||
^ | ||
error: No warnings can be incurred under -Xfatal-warnings. | ||
four warnings found | ||
one error found |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-deprecation -Xfatal-warnings |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
procedure-removal.scala:2: error: procedure syntax is unsupported: instead, add `: Unit =` to explicitly declare `bar`'s return type | ||
def bar {} | ||
^ | ||
procedure-removal.scala:3: error: procedure syntax is unsupported: instead, add `: Unit` to explicitly declare `baz`'s return type | ||
def baz | ||
^ | ||
procedure-removal.scala:4: error: procedure syntax is unsupported: instead, add `: Unit` to explicitly declare `boo`'s return type | ||
def boo(i: Int, l: Long) | ||
^ | ||
procedure-removal.scala:5: error: procedure syntax is unsupported: instead, add `: Unit =` to explicitly declare `boz`'s return type | ||
def boz(i: Int, l: Long) {} | ||
^ | ||
four errors found |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-Xsource:2.14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
abstract class Foo { | ||
def bar {} | ||
def baz | ||
def boo(i: Int, l: Long) | ||
def boz(i: Int, l: Long) {} | ||
def this(i: Int) { this() } // Don't complain here! | ||
def foz: Unit // Don't complain here! | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.