blob: 27c212ac65875e191afd5fc27d1b16167e1ba80c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
class A {
def f(b: Boolean) = {
locally {
while (b == false) ()
// or:
// do () while (b == false)
}
}
}
//
// [Now checking: erasure]
// [check: erasure] New symbols: BoxedUnit UNIT runtime scala
// /tmp/fail.scala:4: error:
// **** ERROR DURING INTERNAL CHECKING ****
// type mismatch;
// found : scala.runtime.BoxedUnit
// required: Unit
// while (b == false) ()
// ^
// one error found
|