aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-07-30 14:52:42 +0100
committerGinger Bill <bill@gingerbill.org>2017-07-30 14:52:42 +0100
commit62a72f0163b2f35ca11cd8f4bbb4c7de2c66fca4 (patch)
treee334be658d8ed4018e8ae8bb37334dbc1834f14c /src/check_decl.cpp
parent655931f0ea282f8dbaa769a213311a774e4f84c6 (diff)
`transmute(type)x`; Minor code clean up
Diffstat (limited to 'src/check_decl.cpp')
-rw-r--r--src/check_decl.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp
index 72ca6d7c4..8b2ab0941 100644
--- a/src/check_decl.cpp
+++ b/src/check_decl.cpp
@@ -319,14 +319,12 @@ bool are_signatures_similar_enough(Type *a_, Type *b_) {
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;
- }
+ i64 sx = type_size_of(heap_allocator(), x);
+ i64 sy = type_size_of(heap_allocator(), y);
+ if (sx == sy) continue;
}
- if (!are_types_identical(x, y)) {
- return false;
- }
+ if (!are_types_identical(x, y)) return false;
}
for (isize i = 0; i < a->result_count; i++) {
Type *x = base_type(a->results->Tuple.variables[i]->type);
@@ -338,9 +336,9 @@ bool are_signatures_similar_enough(Type *a_, Type *b_) {
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;
- }
+ i64 sx = type_size_of(heap_allocator(), x);
+ i64 sy = type_size_of(heap_allocator(), y);
+ if (sx == sy) continue;
}
if (!are_types_identical(x, y)) {