diff options
| author | gingerBill <ginger.bill.22@gmail.com> | 2016-08-03 14:17:13 +0100 |
|---|---|---|
| committer | gingerBill <ginger.bill.22@gmail.com> | 2016-08-03 14:17:13 +0100 |
| commit | 0e92166d442b120b06db57623a93c6ec43e3fccb (patch) | |
| tree | 3912ff47c21eb848cfd754b745c262f7a4f4b04d /src/checker/checker.cpp | |
| parent | 41e7cadb8df4b9833bc3dd827cac32fd3b01ddbd (diff) | |
Slice creation for SliceExpr
Diffstat (limited to 'src/checker/checker.cpp')
| -rw-r--r-- | src/checker/checker.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/checker/checker.cpp b/src/checker/checker.cpp index 5a03baa76..884032ba9 100644 --- a/src/checker/checker.cpp +++ b/src/checker/checker.cpp @@ -312,16 +312,16 @@ void init_universal_scope(void) { } // Constants - add_global_constant(a, make_string("true"), &basic_types[Basic_UntypedBool], make_exact_value_bool(true)); - add_global_constant(a, make_string("false"), &basic_types[Basic_UntypedBool], make_exact_value_bool(false)); - add_global_constant(a, make_string("null"), &basic_types[Basic_UntypedPointer], make_exact_value_pointer(NULL)); + add_global_constant(a, make_string("true"), t_untyped_bool, make_exact_value_bool(true)); + add_global_constant(a, make_string("false"), t_untyped_bool, make_exact_value_bool(false)); + add_global_constant(a, make_string("null"), t_untyped_pointer, make_exact_value_pointer(NULL)); // Builtin Procedures for (isize i = 0; i < gb_count_of(builtin_procedures); i++) { BuiltinProcedureId id = cast(BuiltinProcedureId)i; Token token = {Token_Identifier}; token.string = builtin_procedures[i].name; - Entity *entity = alloc_entity(a, Entity_Builtin, NULL, token, &basic_types[Basic_Invalid]); + Entity *entity = alloc_entity(a, Entity_Builtin, NULL, token, t_invalid); entity->builtin.id = id; add_global_entity(entity); } @@ -433,7 +433,7 @@ void add_type_and_value(CheckerInfo *i, AstNode *expression, AddressingMode mode if (mode == Addressing_Constant) { GB_ASSERT(value.kind != ExactValue_Invalid); - GB_ASSERT(type == &basic_types[Basic_Invalid] || is_type_constant_type(type)); + GB_ASSERT(type == t_invalid || is_type_constant_type(type)); } TypeAndValue tv = {}; |