diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2021-09-27 22:23:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-27 22:23:31 +0200 |
commit | 576fece90967ed2a6209c18ca839f30c751f4332 (patch) | |
tree | 2a76def9f4da47d51a780519b1dd4c8a052981aa /compiler/semobjconstr.nim | |
parent | cdf9ac675b4348a7b5239186637c54920bb92619 (diff) | |
download | Nim-576fece90967ed2a6209c18ca839f30c751f4332.tar.gz |
fixes 'lent T' inside object constructor [backport] (#18911)
* fixes 'lent T' inside object constructor [backport] * progress
Diffstat (limited to 'compiler/semobjconstr.nim')
-rw-r--r-- | compiler/semobjconstr.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semobjconstr.nim b/compiler/semobjconstr.nim index 1563e5c16..001956ede 100644 --- a/compiler/semobjconstr.nim +++ b/compiler/semobjconstr.nim @@ -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 |