added types.isFinal helper proc
This commit is contained in:
parent
ee7a9a272d
commit
1f61498238
1 changed files with 4 additions and 0 deletions
|
|
@ -339,6 +339,10 @@ proc canFormAcycleAux(marker: var IntSet, typ: PType, startId: int): bool =
|
||||||
of tyProc: result = typ.callConv == ccClosure
|
of tyProc: result = typ.callConv == ccClosure
|
||||||
else: discard
|
else: discard
|
||||||
|
|
||||||
|
proc isFinal*(t: PType): bool =
|
||||||
|
var t = t.skipTypes(abstractInst)
|
||||||
|
result = t.kind != tyObject or tfFinal in t.flags
|
||||||
|
|
||||||
proc canFormAcycle*(typ: PType): bool =
|
proc canFormAcycle*(typ: PType): bool =
|
||||||
var marker = initIntSet()
|
var marker = initIntSet()
|
||||||
result = canFormAcycleAux(marker, typ, typ.id)
|
result = canFormAcycleAux(marker, typ, typ.id)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue