compiler distinguishes between 2 different 'var' types for C++ interop; code cleanups
This commit is contained in:
parent
e84834db79
commit
74c6c8c903
7 changed files with 45 additions and 104 deletions
|
|
@ -1209,6 +1209,7 @@ proc asgnToResultVar(c: PContext, n, le, ri: PNode) {.inline.} =
|
|||
if x.typ.kind == tyVar and x.kind == nkSym and x.sym.kind == skResult:
|
||||
n.sons[0] = x # 'result[]' --> 'result'
|
||||
n.sons[1] = takeImplicitAddr(c, ri)
|
||||
x.typ.flags.incl tfVarIsPtr
|
||||
|
||||
template resultTypeIsInferrable(typ: PType): expr =
|
||||
typ.isMetaType and typ.kind != tyTypeDesc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue