mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-06 13:07:59 +00:00
Add #soa pointer type to aid with refactoring to #soa data types
a: #soa[16]Foo p := &a[6] #assert(type_of(p) == #soa^#soa[16]Foo) p^.x = 123 p.x = 123
This commit is contained in:
@@ -320,7 +320,7 @@ void check_type_decl(CheckerContext *ctx, Entity *e, Ast *init_expr, Type *def)
|
||||
} else if (is_type_any(e->type)) {
|
||||
error(init_expr, "'distinct' cannot be applied to 'any'");
|
||||
is_distinct = false;
|
||||
} else if (is_type_simd_vector(e->type)) {
|
||||
} else if (is_type_simd_vector(e->type) || is_type_soa_pointer(e->type)) {
|
||||
gbString str = type_to_string(e->type);
|
||||
error(init_expr, "'distinct' cannot be applied to '%s'", str);
|
||||
gb_string_free(str);
|
||||
|
||||
Reference in New Issue
Block a user