Allow only single infix as in except branches. Fixes #7115 (#7132)

This commit is contained in:
cooldome 2018-03-08 09:56:32 +00:00 • committed by Andreas Rumpf
commit 63c28b973e
2 changed files with 41 additions and 41 deletions

View file

@ -32,3 +32,11 @@ proc testTryAsExpr(i: int) =
test[Exception]()
test2()
testTryAsExpr(5)
# see bug #7115
doAssert(not compiles(
try:
echo 1
except [KeyError as ex1, ValueError as ex2]:
echo 2
))