KT-3025 Bad handling of missing expression in catch()

#KT-3025 Fixed
This commit is contained in:
Andrey Breslav
2012-11-07 16:00:28 +04:00
parent 4ca7d086c2
commit d8ef7210dc
4 changed files with 458 additions and 3 deletions
+61
View File
@@ -0,0 +1,61 @@
fun testOpenParens() {
try {
} catch {
}
try {
} catch ( {
}
try {
} catch (e: {
}
try {
} catch (e: Exception {
}
}
fun testClosedParens() {
try {
} catch () {
}
try {
} catch (e) {
}
try {
} catch (e:) {
}
try {
} catch (e: Exception) {
}
try {
} catch (: Exception) {
}
try {
} catch (:) {
}
}
fun testFinally() {
try {
} catch
finally {
}
try {
} catch ()
finally {
}
try {
} catch (e : Exception)
finally {
}
}