diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-06-01 14:23:46 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-06-01 14:23:46 +0100 |
| commit | 0d4945dc8788e8aa134fbdbd0941d9a6db0b67bc (patch) | |
| tree | 5344e3270f99746fdcee6237ebe768c1babfb822 /src/check_decl.c | |
| parent | fec6df65b3306005077ee6124458eaaf3ea7ce2c (diff) | |
Implement u128/i128 features; Add bits.odin
Diffstat (limited to 'src/check_decl.c')
| -rw-r--r-- | src/check_decl.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/check_decl.c b/src/check_decl.c index 725876665..6b15cdaca 100644 --- a/src/check_decl.c +++ b/src/check_decl.c @@ -206,12 +206,20 @@ bool are_signatures_similar_enough(Type *a_, Type *b_) { return false; } for (isize i = 0; i < a->param_count; i++) { - Type *x = base_type(a->params->Tuple.variables[i]->type); - Type *y = base_type(b->params->Tuple.variables[i]->type); + Type *x = core_type(a->params->Tuple.variables[i]->type); + Type *y = core_type(b->params->Tuple.variables[i]->type); if (is_type_pointer(x) && is_type_pointer(y)) { continue; } + if (is_type_integer(x) && is_type_integer(y)) { + GB_ASSERT(x->kind == Type_Basic); + GB_ASSERT(y->kind == Type_Basic); + if (x->Basic.size == y->Basic.size) { + continue; + } + } + if (!are_types_identical(x, y)) { return false; } @@ -223,6 +231,14 @@ bool are_signatures_similar_enough(Type *a_, Type *b_) { continue; } + if (is_type_integer(x) && is_type_integer(y)) { + GB_ASSERT(x->kind == Type_Basic); + GB_ASSERT(y->kind == Type_Basic); + if (x->Basic.size == y->Basic.size) { + continue; + } + } + if (!are_types_identical(x, y)) { return false; } |