Last active
August 29, 2015 13:56
-
-
Save jmhodges/9282988 to your computer and use it in GitHub Desktop.
The catch statement doesn't print the text. Seen with scala 2.8.1, 2.9.2 and now 2.10.x.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Welp { | |
def foobar(a: Int, b: Int, c:Int) { throw new IllegalArgumentException } | |
def main(args: Array[String]) { | |
List(3) map { | |
try { | |
foobar(1, 2, _) | |
} catch { | |
case e: Throwable => { // This set of braces is optional. Problem remains when removed. | |
println("won't be printed") | |
throw e | |
}} | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
scalac Welp.scala && scala -classpath . Welp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That isn't plain English, but "math English". I think "properly" there is analogous to proper subset, even though we're not talking about sets: an expression e1 is properly contained into e2 if e1 is contained in e2 and e1 is different from e2. But I guess clarifying this in the spec could be a good idea.