diff options
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r-- | compiler/semstmts.nim | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index 35c686bcb..674589306 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -286,8 +286,7 @@ proc semTry(c: PContext, n: PNode): PNode = var typeNode = a.sons[j] # e.g. `Exception` var symbolNode: PNode = nil # e.g. `foobar` # Handle the case where the `Exception as foobar` syntax is used. - if typeNode.kind == nkInfix and - considerQuotedIdent(typeNode[0]).s == "as": + if typeNode.isExceptAs(): typeNode = a.sons[j].sons[1] symbolNode = a.sons[j].sons[2] |