Skip to content

Commit

Permalink
Fix tests after phase move: constant folding happens later
Browse files Browse the repository at this point in the history
  • Loading branch information
liufengyun committed Apr 16, 2021
1 parent 54d409b commit 66044b0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/init/neg/constant.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class A {
final val a = b
final val b = 4
final val b = 4 // error
}
2 changes: 1 addition & 1 deletion tests/init/neg/final-fields.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ object Test0 extends U {
object Test1 extends U {
final val f1 = 1
final val f3 = f1 + f2
final val f2 = 2
final val f2 = 2 // error: but constant folding avoided the issue
val f4: 3 = f3


Expand Down
2 changes: 1 addition & 1 deletion tests/init/neg/global-cycle7.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ abstract class TokensCommon {

object JavaTokens extends TokensCommon {
final def maxToken: Int = DOUBLE
final val DOUBLE = 188
final val DOUBLE = 188 // error: but constant folding avoided the issue
}

0 comments on commit 66044b0

Please sign in to comment.