File tree Expand file tree Collapse file tree 2 files changed +12
-18
lines changed Expand file tree Collapse file tree 2 files changed +12
-18
lines changed Original file line number Diff line number Diff line change 11object Test
22
3- locally :
3+ locally {
44 var x = 0
55 while x < 10 do x += 1
66 end while // error: end of statement expected but while found // error: not found: end
@@ -9,7 +9,8 @@ object Test
99 x += 1
1010 x < 10
1111 do ()
12- end while // error: misaligned end marker
12+ end while // error: misaligned end marker // error: not found : end
13+ } // error: ';' expected, but '}' found
1314
1415 def f (x : Int ): Int =
1516 val y =
@@ -23,22 +24,12 @@ object Test
2324
2425 val z = 22
2526 x + y + z
26- end f // error: misaligned end marker
27+ end f
2728
2829 def g = " !"
2930
3031 val xs = List (1 , 2 , 3 )
3132
32- xs.map:
33- x =>
34- val y = x * x
35- y * y
36-
37- xs.map:
38- x =>
39- val y = x * x
40- y + y
41-
4233 println(f(2 ) + g)
4334
4435 (new Test2 ).foo
@@ -57,10 +48,11 @@ class Test2
5748 def foo = 1
5849
5950 object x
60- new Test2 :
51+ new Test2 {
6152 override def foo = 2
6253 end new // error: end of statement expected but new found // error: not found: end
63- def bar = 2 // error: ';' expected, but unindent found
54+ } // error: ';' expected, but '}' found
55+ def bar = 2
6456 end Test2 // error: misaligned end marker
6557end Test2
6658
@@ -102,9 +94,11 @@ class Coder(words: List[String])
10294 /** Invert the mnemonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
10395 private val charCode0 : Map [Char , Char ] =
10496 mnemonics
105- .withFilter:
97+ .withFilter {
10698 case (digit, str) => true
10799 case _ => false
108- .flatMap:
100+ }
101+ .flatMap {
109102 case (digit, str) => str map (ltr => ltr -> digit)
103+ }
110104 end Coder // error: The start of this line does not match any of the previous indentation widths.
Original file line number Diff line number Diff line change 11// ==> 05bef7805687ba94da37177f7568e3ba7da1f91c.scala <==
22class x0 {
33 x1 : // error
4- x0 | _
4+ x0 | _ // error
55// error
You can’t perform that action at this time.
0 commit comments