diff options
author | Paul Phillips <paulp@improving.org> | 2010-10-07 22:18:59 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-10-07 22:18:59 +0000 |
commit | 001e910f9774b2da00da2d56b7ba92d78a9c20ce (patch) | |
tree | 9216c2bc6192554894544a2e73d29da7e4e60b47 /test | |
parent | 68aafb29c162c117d87ef4786ee2226bd08663bc (diff) | |
download | scala-001e910f9774b2da00da2d56b7ba92d78a9c20ce.tar.gz scala-001e910f9774b2da00da2d56b7ba92d78a9c20ce.tar.bz2 scala-001e910f9774b2da00da2d56b7ba92d78a9c20ce.zip |
Did a bunch of symbol oriented work on checkers.
changes in Global and Typer to accomodate this, and renamed "Checkers"
to "ICodeCheckers" to make some less confusing space for the future
"SymbolCheckers". No review.
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 |