mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-01 10:52:14 +00:00
backport sane ast.isException implementation
This commit is contained in:
@@ -1731,7 +1731,7 @@ proc isException*(t: PType): bool =
|
||||
return false
|
||||
|
||||
var base = t
|
||||
while base != nil:
|
||||
while base != nil and base.kind in {tyRef, tyObject, tyGenericInst}:
|
||||
if base.sym != nil and base.sym.magic == mException:
|
||||
return true
|
||||
base = base.lastSon
|
||||
|
||||
Reference in New Issue
Block a user