diff options
| author | Ginger Bill <bill@gingerbill.org> | 2016-09-30 20:38:46 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2016-09-30 20:38:46 +0100 |
| commit | c6aac264fa8001ff5e55e5ac6f56289ff0a755ee (patch) | |
| tree | 4ff0521b330e5a2b0183d3bab2f762a669b5efa5 /src/checker/checker.cpp | |
| parent | 04b5d8c132e8aabb3bb5dff31683cb45d4dff9c0 (diff) | |
Begin work on const llvm aggregate literals
Diffstat (limited to 'src/checker/checker.cpp')
| -rw-r--r-- | src/checker/checker.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/checker/checker.cpp b/src/checker/checker.cpp index 7d32f4cce..f9000446e 100644 --- a/src/checker/checker.cpp +++ b/src/checker/checker.cpp @@ -619,9 +619,11 @@ void add_type_and_value(CheckerInfo *i, AstNode *expression, AddressingMode mode return; if (mode == Addressing_Constant) { - GB_ASSERT(value.kind != ExactValue_Invalid); - if (!(type != t_invalid || is_type_constant_type(type))) { - compiler_error("add_type_and_value - invalid type: %s", type_to_string(type)); + if (is_type_constant_type(type)) { + GB_ASSERT(value.kind != ExactValue_Invalid); + if (!(type != t_invalid || is_type_constant_type(type))) { + compiler_error("add_type_and_value - invalid type: %s", type_to_string(type)); + } } } |