diff options
author | Andrii Riabushenko <cdome@bk.ru> | 2020-01-19 20:21:26 +0000 |
---|---|---|
committer | Andrii Riabushenko <cdome@bk.ru> | 2020-01-19 20:21:26 +0000 |
commit | 7576387dfe0b59fbf5fc2b095ce4c431b3f04ea9 (patch) | |
tree | 5c7ca4a95c5002929d023efbef9d00a53d5e87b3 /compiler/ccgexprs.nim | |
parent | 13ddbc46fc255978ebaf4233009b44db29583cb4 (diff) | |
download | Nim-7576387dfe0b59fbf5fc2b095ce4c431b3f04ea9.tar.gz |
revert last commit
Diffstat (limited to 'compiler/ccgexprs.nim')
-rw-r--r-- | compiler/ccgexprs.nim | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim index eed29ff4b..885ee3486 100644 --- a/compiler/ccgexprs.nim +++ b/compiler/ccgexprs.nim @@ -2818,11 +2818,10 @@ proc getNullValueAux(p: BProc; t: PType; obj, constOrNil: PNode, # designated initilization is the only way to init non first element of unions # branches are allowed to have no members (b.len == 0), in this case they don't need initializer if b.kind == nkRecList and b.len > 0: - result.add "._i" & $selectedBranch & " = {" + result.add "._" & mangleRecFieldName(p.module, obj[0].sym) & "_" & $selectedBranch & " = {" getNullValueAux(p, t, b, constOrNil, result, countB, isConst, info) result.add "}" elif b.kind == nkSym: - result.add "." & lastSon(obj[selectedBranch]).sym.loc.r & " = " getNullValueAux(p, t, b, constOrNil, result, countB, isConst, info) result.add "}" |