aboutsummaryrefslogtreecommitdiff
path: root/src/AstGen.zig
diff options
context:
space:
mode:
authorVeikka Tuominen <git@vexu.eu>2021-06-06 21:08:31 +0300
committerVeikka Tuominen <git@vexu.eu>2021-06-07 22:15:56 +0300
commit7efd7bc3b8cc403814c0aa62be0a17ff25b33902 (patch)
tree7b92414b05bfc0e66bdc8aff4f3a68abc9a88ee7 /src/AstGen.zig
parentca6951ff7959b88573bfec7c7bf0465209f3263f (diff)
downloadzig-7efd7bc3b8cc403814c0aa62be0a17ff25b33902.tar.gz
zig-7efd7bc3b8cc403814c0aa62be0a17ff25b33902.zip
stage2: implement comptime variables
Diffstat (limited to 'src/AstGen.zig')
-rw-r--r--src/AstGen.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/AstGen.zig b/src/AstGen.zig
index 564813f9e3..c4482131d8 100644
--- a/src/AstGen.zig
+++ b/src/AstGen.zig
@@ -2357,7 +2357,7 @@ fn varDecl(
return &sub_scope.base;
},
.keyword_var => {
- const is_comptime = var_decl.comptime_token != null;
+ const is_comptime = var_decl.comptime_token != null or gz.force_comptime;
var resolve_inferred_alloc: Zir.Inst.Ref = .none;
const var_data: struct {
result_loc: ResultLoc,