mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-19 21:31:39 +00:00
progress
This commit is contained in:
@@ -232,8 +232,7 @@ proc evalTypeTrait(c: PContext; traitCall: PNode, operand: PType, context: PSym)
|
||||
of "stripGenericParams":
|
||||
result = uninstantiate(operand).toNode(traitCall.info)
|
||||
of "supportsCopyMem":
|
||||
let complexObj = supportsCopyMem(operand)
|
||||
result = newIntNodeT(toInt128(ord(not complexObj)), traitCall, c.idgen, c.graph)
|
||||
result = newIntNodeT(toInt128(ord(supportsCopyMem(operand))), traitCall, c.idgen, c.graph)
|
||||
of "canFormCycles":
|
||||
result = newIntNodeT(toInt128(ord(types.canFormAcycle(c.graph, operand))), traitCall, c.idgen, c.graph)
|
||||
of "hasDefaultValue":
|
||||
|
||||
@@ -1782,5 +1782,4 @@ proc reduceToBase*(f: PType): PType =
|
||||
|
||||
proc supportsCopyMem*(t: PType): bool =
|
||||
let t = t.skipTypes({tyVar, tyLent, tyGenericInst, tyAlias, tySink, tyInferred})
|
||||
result = containsGarbageCollectedRef(t) or
|
||||
hasDestructor(t)
|
||||
result = not containsGarbageCollectedRef(t) and not hasDestructor(t)
|
||||
|
||||
Reference in New Issue
Block a user