mirror of
https://github.com/nim-lang/Nim.git
synced 2026-09-18 11:04:53 +00:00
17 lines
384 B
Nim
17 lines
384 B
Nim
discard """
|
|
action: compile
|
|
ccodeCheck: "@'((*Result).f);' .*"
|
|
"""
|
|
|
|
# bug #26104: a compile-time-only `typeof` argument was treated as a runtime
|
|
# alias of the result field, forcing an unnecessarily large temporary and copy.
|
|
type
|
|
B = array[131072, byte]
|
|
Y = object
|
|
f: B
|
|
|
|
proc fill(_: type B): B = discard
|
|
proc make(): Y = result.f = fill(typeof(result.f))
|
|
|
|
discard make()
|