Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- object a {
- def foo(x: String) = {
- val (str, i): Tuple2[String, Int] = x match {
- case "a" => (5, "bob")
- case _ => (10, "tom")
- }
- str
- }
- }
- // scala> a.foo("x")
- // java.lang.ClassCastException: java.lang.Integer
Add Comment
Please, Sign In to add comment