aboutsummaryrefslogtreecommitdiff
path: root/src/stage1
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-03-24 21:45:22 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-03-24 21:47:18 -0700
commitbcf2eb1a003d076c166d4ce9cba20f6ed9b53887 (patch)
tree0703024c1c2d2601cd0eee38ac729d01027c8857 /src/stage1
parentb802a67562cc912213ebfc6ef8a380c775c999fe (diff)
downloadzig-bcf2eb1a003d076c166d4ce9cba20f6ed9b53887.tar.gz
zig-bcf2eb1a003d076c166d4ce9cba20f6ed9b53887.zip
Sema: fix closure capture typeof runtime-known parameter
Closures are not necessarily constant values. For example, Zig code might do something like this: fn foo(x: anytype) void { const S = struct {field: @TypeOf(x)}; } ...in which case the closure_capture instruction has access to a runtime value only. In such case we preserve the type and use a dummy runtime value. closes #11292
Diffstat (limited to 'src/stage1')
0 files changed, 0 insertions, 0 deletions