Now analyzes over magics instead of symbol names; but dosn't compile for me
This commit is contained in:
parent
a15ddf4013
commit
15f72d0cf1
3 changed files with 4 additions and 3 deletions
|
|
@ -733,7 +733,7 @@ proc semRaise(c: PContext, n: PNode): PNode =
|
|||
# check if the given object inherits from Exception
|
||||
var base = typ.lastSon
|
||||
while true:
|
||||
if base.sym.name.s == "Exception":
|
||||
if base.sym.magic == mException:
|
||||
break
|
||||
if base.lastSon == nil:
|
||||
localError(n.info, "raised object of type $1 does not inherit from Exception", [typ.sym.name.s])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue