diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-04-30 16:22:24 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-04-30 16:22:24 +0100 |
| commit | 1430ca30a3a0677fb395d2c5c190e86f02ed2b06 (patch) | |
| tree | 6dcd158f5c66a356edb1fac6922668b8da1f49b6 /src/entity.c | |
| parent | e63393e3941f43aca0976367d36f22207758e4a1 (diff) | |
Fix subtype polymorphism implicit conversion
Diffstat (limited to 'src/entity.c')
| -rw-r--r-- | src/entity.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/entity.c b/src/entity.c index 41d11371e..18b318a1f 100644 --- a/src/entity.c +++ b/src/entity.c @@ -185,20 +185,20 @@ Entity *make_entity_type_name(gbAllocator a, Scope *scope, Token token, Type *ty return entity; } -Entity *make_entity_param(gbAllocator a, Scope *scope, Token token, Type *type, bool anonymous, bool is_immutable) { +Entity *make_entity_param(gbAllocator a, Scope *scope, Token token, Type *type, bool is_using, bool is_immutable) { Entity *entity = make_entity_variable(a, scope, token, type, is_immutable); entity->flags |= EntityFlag_Used; - if (anonymous) entity->flags |= EntityFlag_Using; + if (is_using) entity->flags |= EntityFlag_Using; entity->flags |= EntityFlag_Param; return entity; } -Entity *make_entity_field(gbAllocator a, Scope *scope, Token token, Type *type, bool anonymous, i32 field_src_index) { +Entity *make_entity_field(gbAllocator a, Scope *scope, Token token, Type *type, bool is_using, i32 field_src_index) { Entity *entity = make_entity_variable(a, scope, token, type, false); entity->Variable.field_src_index = field_src_index; entity->Variable.field_index = field_src_index; + if (is_using) entity->flags |= EntityFlag_Using; entity->flags |= EntityFlag_Field; - entity->flags |= EntityFlag_Using*(anonymous != 0); return entity; } |