summaryrefslogtreecommitdiff
path: root/test/checker-tests/fail12.scala
blob: 75683114548ae5032a92671783b8591591ca0cf4 (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