|
Scala example source code file (bug4148.scala)
The Scala bug4148.scala source codeobject Test { val x1 = try { "aaa".asInstanceOf[Int] } catch { case _ => "cce1" } val x2 = try { (5: Any).asInstanceOf[Int] } catch { case _ => "cce2" } val x3 = try { (new java.lang.Short(100.toShort).asInstanceOf[Int]) } catch { case _ => "cce3" } def main(args: Array[String]): Unit = { List(x1, x2, x3) foreach println } } Other Scala examples (source code examples)Here is a short list of links related to this Scala bug4148.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.