|
Scala example source code file (fail12.scala)
The Scala fail12.scala source code
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
Other Scala examples (source code examples)Here is a short list of links related to this Scala fail12.scala source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.