From 63c28b973e84e86ad0b9a69cf683cf93809af4f2 Mon Sep 17 00:00:00 2001 From: cooldome Date: Thu, 8 Mar 2018 09:56:32 +0000 Subject: Allow only single infix as in except branches. Fixes #7115 (#7132) --- tests/exception/texcas.nim | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') diff --git a/tests/exception/texcas.nim b/tests/exception/texcas.nim index 298aee707..7108e334c 100644 --- a/tests/exception/texcas.nim +++ b/tests/exception/texcas.nim @@ -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 +)) -- cgit 1.4.1-2-gfad0