mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 20:17:42 +00:00
Close #17509 Current knowledge: - delaying cache fixes the issue - changing return of `if inst.len < key.len:` in `searchInstTypes` to `continue` fixes the issue. With return the broken types are also cached over and over Related issues are completely unaffected as of now, so there must be something deeper. I am also still trying to find the true cause, so feel free to ignore for now --------- Co-authored-by: SirOlaf <>
25 lines
527 B
Nim
25 lines
527 B
Nim
type List[O] = object
|
|
next: ptr List[O]
|
|
|
|
proc initList[O](l: ptr List[O]) =
|
|
l[].next = l
|
|
|
|
type
|
|
PolytopeVertex[R] = object
|
|
list: List[PolytopeVertex[R]]
|
|
|
|
PolytopeEdge[R] = object
|
|
list: List[PolytopeEdge[R]]
|
|
|
|
Polytope[R] = object
|
|
vertices: List[PolytopeVertex[R]]
|
|
edges: List[PolytopeEdge[R]]
|
|
|
|
var pt: Polytope[float]
|
|
|
|
static:
|
|
doAssert pt.vertices.next is (ptr List[PolytopeVertex[float]])
|
|
doAssert pt.edges.next is (ptr List[PolytopeEdge[float]])
|
|
|
|
initList(addr pt.vertices)
|
|
initList(addr pt.edges) |