Skip to content

Commit c5b9879

Browse files
committed
Fix places using unsupported lambda syntax
1 parent 5194716 commit c5b9879

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

compiler/src/dotty/tools/dotc/parsing/Parsers.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,10 @@ object Parsers {
418418
finally staged = saved
419419
}
420420

421+
val x = 2
422+
if (x + 1 == 3) && true then 1 else 2
423+
424+
421425
/* ---------- TREE CONSTRUCTION ------------------------------------------- */
422426

423427
/** Convert tree to formal parameter list
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
scala> try { 0 } catch { _: Throwable => 1 }
1+
scala> try { 0 } catch { (_: Throwable) => 1 }
22
val res0: Int = 0

tests/run-staging/staged-streams_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ object Test {
437437
})
438438
case Many => producer.init(st => '{
439439
val oldnadv: Unit => Unit = ${nadv.get}
440-
val adv1: Unit => Unit = { _: Unit => {
440+
val adv1: Unit => Unit = { (_: Unit) => {
441441
if(${producer.hasNext(st)}) {
442442
${producer.step(st, k)}
443443
}

0 commit comments

Comments
 (0)