Skip to content

Commit

Permalink
Adapt MatchASTTest for Scala 2.13.4.
Browse files Browse the repository at this point in the history
Something seems to have changed in Scala 2.13.4 that optimizes
`match`es whose scrutinee is a literal, causing two (similar) tests
to fail. Since the literal scrutinee was not the point of those
tests, we move it to another `def`.
  • Loading branch information
sjrd committed Nov 7, 2020
1 parent 592391e commit 22a12c9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ class MatchASTTest extends JSASTTest {
def stripIdentityMatchEndNonUnitResult: Unit = {
"""
object A {
def foo = "a" match {
def aString: String = "a"
def foo = aString match {
case "a" => true
case "b" => false
}
Expand All @@ -39,7 +40,8 @@ class MatchASTTest extends JSASTTest {
def stripIdentityMatchEndUnitResult: Unit = {
"""
object A {
def foo = "a" match {
def aString: String = "a"
def foo = aString match {
case "a" =>
case "b" =>
}
Expand Down

0 comments on commit 22a12c9

Please sign in to comment.