Skip to content

Commit

Permalink
Test braceless match w/ semicolon between cases
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Nov 5, 2024
1 parent a88e8d6 commit a4572dd
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7519,3 +7519,13 @@ val bar: Int => Pf =
>>>
val bar: Int => Pf =
case msg: Int => msg + 1
<<< #4133 braceless in `match` with a semicolon between cases
tag match
case TYPEREFsymbol | TYPEREFdirect | TERMREFsymbol | TERMREFdirect =>
node.refPrivate = in0.readByte() == PRIVATE;
case _ =>
>>>
tag match
case TYPEREFsymbol | TYPEREFdirect | TERMREFsymbol | TERMREFdirect =>
node.refPrivate = in0.readByte() == PRIVATE;
case _ =>
Original file line number Diff line number Diff line change
Expand Up @@ -7233,3 +7233,18 @@ val bar: Int => Pf =
>>>
val bar: Int => Pf =
case msg: Int => msg + 1
<<< #4133 braceless in `match` with a semicolon between cases
tag match
case TYPEREFsymbol | TYPEREFdirect | TERMREFsymbol | TERMREFdirect =>
node.refPrivate = in0.readByte() == PRIVATE;
case _ =>
>>>
test does not parse: [dialect scala3] `outdent` expected but `case` found
tag match
case TYPEREFsymbol | TYPEREFdirect | TERMREFsymbol | TERMREFdirect =>
node.refPrivate = in0.readByte() == PRIVATE; case _ =>
^
====== full result: ======
tag match
case TYPEREFsymbol | TYPEREFdirect | TERMREFsymbol | TERMREFdirect =>
node.refPrivate = in0.readByte() == PRIVATE; case _ =>
Original file line number Diff line number Diff line change
Expand Up @@ -7548,3 +7548,13 @@ val bar: Int => Pf =
>>>
val bar: Int => Pf =
case msg: Int => msg + 1
<<< #4133 braceless in `match` with a semicolon between cases
tag match
case TYPEREFsymbol | TYPEREFdirect | TERMREFsymbol | TERMREFdirect =>
node.refPrivate = in0.readByte() == PRIVATE;
case _ =>
>>>
tag match
case TYPEREFsymbol | TYPEREFdirect | TERMREFsymbol | TERMREFdirect =>
node.refPrivate = in0.readByte() == PRIVATE;
case _ =>
Original file line number Diff line number Diff line change
Expand Up @@ -7828,3 +7828,13 @@ val bar: Int => Pf =
val bar: Int => Pf =
case msg: Int =>
msg + 1
<<< #4133 braceless `match` with a semicolon between cases
tag match
case TYPEREFsymbol | TYPEREFdirect | TERMREFsymbol | TERMREFdirect =>
node.refPrivate = in0.readByte() == PRIVATE;
case _ =>
>>>
tag match
case TYPEREFsymbol | TYPEREFdirect | TERMREFsymbol | TERMREFdirect =>
node.refPrivate = in0.readByte() == PRIVATE;
case _ =>
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class FormatTests extends FunSuite with CanRunTests with FormatAssertions {
val explored = Debug.explored.get()
logger.debug(s"Total explored: $explored")
if (!onlyUnit && !onlyManual)
assertEquals(explored, 1497775, "total explored")
assertEquals(explored, 1497994, "total explored")
val results = debugResults.result()
// TODO(olafur) don't block printing out test results.
// I don't want to deal with scalaz's Tasks :'(
Expand Down

0 comments on commit a4572dd

Please sign in to comment.