diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2023-12-12 16:54:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-12 16:54:50 +0100 |
commit | db603237c648a796ef7bff77641febd30b3999cd (patch) | |
tree | 13e693ac432b1542cab7f2b2bbe1b8c11ca258e0 /compiler/lowerings.nim | |
parent | 8cc3c774c8925c3d21626d09b41ad352bd898e4a (diff) | |
download | Nim-db603237c648a796ef7bff77641febd30b3999cd.tar.gz |
Types: Refactorings; step 1 (#23055)
Diffstat (limited to 'compiler/lowerings.nim')
-rw-r--r-- | compiler/lowerings.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/lowerings.nim b/compiler/lowerings.nim index f8ae67f41..0ed4c436f 100644 --- a/compiler/lowerings.nim +++ b/compiler/lowerings.nim @@ -19,7 +19,7 @@ when defined(nimPreviewSlimSystem): import std/assertions proc newDeref*(n: PNode): PNode {.inline.} = - result = newNodeIT(nkHiddenDeref, n.info, n.typ[0]) + result = newNodeIT(nkHiddenDeref, n.info, n.typ.elementType) result.add n proc newTupleAccess*(g: ModuleGraph; tup: PNode, i: int): PNode = @@ -262,7 +262,7 @@ proc indirectAccess*(a: PNode, b: ItemId, info: TLineInfo): PNode = assert t.kind == tyObject field = lookupInRecord(t.n, b) if field != nil: break - t = t[0] + t = t.baseClass if t == nil: break t = t.skipTypes(skipPtrs) #if field == nil: @@ -286,7 +286,7 @@ proc indirectAccess*(a: PNode, b: string, info: TLineInfo; cache: IdentCache): P assert t.kind == tyObject field = getSymFromList(t.n, bb) if field != nil: break - t = t[0] + t = t.baseClass if t == nil: break t = t.skipTypes(skipPtrs) #if field == nil: |