fixes 'lent T' inside object constructor [backport] (#18911)
* fixes 'lent T' inside object constructor [backport] * progress
This commit is contained in:
parent
cdf9ac675b
commit
576fece909
4 changed files with 21 additions and 3 deletions
|
|
@ -79,7 +79,7 @@ proc semConstrField(c: PContext, flags: TExprFlags,
|
|||
|
||||
var initValue = semExprFlagDispatched(c, assignment[1], flags)
|
||||
if initValue != nil:
|
||||
initValue = fitNode(c, field.typ, initValue, assignment.info)
|
||||
initValue = fitNodeConsiderViewType(c, field.typ, initValue, assignment.info)
|
||||
assignment[0] = newSymNode(field)
|
||||
assignment[1] = initValue
|
||||
assignment.flags.incl nfSem
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue