diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/checker-tests/fail12.scala | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/checker-tests/fail12.scala b/test/checker-tests/fail12.scala new file mode 100644 index 0000000000..7568311454 --- /dev/null +++ b/test/checker-tests/fail12.scala @@ -0,0 +1,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 |