diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-02-18 22:19:35 +0000 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-02-18 22:19:35 +0000 |
| commit | 0c37aa9ea0271ddd8c93ea65f76d2f9ef4d777c5 (patch) | |
| tree | d3a8907ca922e4e5c0b4439b3d6a043baa8a481b /src/check_expr.c | |
| parent | 9ff474f387f8cfb2b0ee780034c584aabccb9248 (diff) | |
Fix overloading bug due to comparison of named types
Diffstat (limited to 'src/check_expr.c')
| -rw-r--r-- | src/check_expr.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/check_expr.c b/src/check_expr.c index 41f9ce08d..2f612513b 100644 --- a/src/check_expr.c +++ b/src/check_expr.c @@ -183,10 +183,7 @@ i64 check_distance_between_types(Checker *c, Operand *operand, Type *type) { // TODO(bill): Should I allow this implicit conversion at all?! // rawptr <- ^T - if (is_type_rawptr(dst) && is_type_pointer(src)) { - if (dst != type) { - return -1; - } + if (are_types_identical(type, t_rawptr) && is_type_pointer(src)) { return 5; } #endif |