Skip to content

Commit 687c2fa

Browse files
committed
Tests with badly formatted code
1 parent 67f7944 commit 687c2fa

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tests/pos/syntaxHeals.scala

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Compile with -rewrite -pascal-style
2+
// Then compile again with -rewrite c-style
3+
// The resulting file is the same as the original one, except for better formatting
4+
object Test {
5+
6+
val xs = List(1, 2, 3)
7+
8+
for(x <- xs)yield x * 2
9+
10+
for(x <- xs)
11+
yield x * 2
12+
13+
for{ x <- xs; y <- xs }yield x * y
14+
15+
for{
16+
x <- xs
17+
y <- xs
18+
}yield x * y
19+
20+
if(xs == Nil)println("yes")
21+
22+
if(xs == Nil)
23+
println("yes")
24+
}

0 commit comments

Comments
 (0)