-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SI-6595, lost modifiers in early defs.
[backport] Saw this by accident; the trees created for early defs would wholesale replace the modifiers with PRESUPER rather than combining them. FINAL was lost that way, as would be any other modifiers which might be valid there.
- Loading branch information
Showing
3 changed files
with
20 additions
and
1 deletion.
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 @@ | ||
-Xfatal-warnings |
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,18 @@ | ||
import scala.annotation.switch | ||
|
||
class Foo extends { | ||
final val b0 = 5 | ||
} with AnyRef { | ||
final val b1 = 10 | ||
|
||
// Using the @switch annotation as a means of testing that the | ||
// type inferred for b0 is Int(5) and not Int. Only in the former | ||
// case can a switch be generated. | ||
def f(p: Int) = (p: @switch) match { | ||
case `b0` => 1 | ||
case `b1` => 2 | ||
case 15 => 3 | ||
case 20 => 4 | ||
case _ => 5 | ||
} | ||
} |