src/AstGen.zig | 50 +++++++++++++++++++++----------- src/Module.zig | 34 ++++++++++++++++++++++ src/Sema.zig | 4 +-- test/cases/compile_errors/any_typed_null_to_any_typed_optional.zig | 4 +-- test/cases/compile_errors/assign_through_constant_pointer.zig | 2 +- test/cases/compile_errors/assign_through_constant_slice.zig | 2 +- test/cases/compile_errors/assign_to_constant_field.zig | 2 +- test/cases/compile_errors/assign_to_constant_variable.zig | 2 +- test/cases/compile_errors/call_assigned_to_constant.zig | 4 +-- test/cases/compile_errors/comptime_store_in_comptime_switch_in_runtime_if.zig | 2 +- test/cases/compile_errors/global_var_struct_init_in_comptim_block.zig | 14 +++++++++ test/cases/compile_errors/non-const_expression_function_call_with_struct_return_value_outside_function.zig | 4 +-- test/cases/compile_errors/reassign_to_slice_parameter.zig | 2 +- test/cases/compile_errors/reference_to_const_data.zig | 8 ++--- test/cases/compile_errors/write_to_const_global_variable.zig | 2 +- test/cases/x86_64-linux/comptime_var.0.zig | 2 +- test/cases/x86_64-linux/comptime_var.1.zig | 2 +- test/cases/x86_64-macos/comptime_var.0.zig | 2 +- test/cases/x86_64-macos/comptime_var.1.zig | 2 +- 19 files changed, 104 insertions(+), 40 deletions(-)