Fix overloading bug due to comparison of named types

This commit is contained in:
Ginger Bill
2017-02-18 22:19:35 +00:00
parent 9ff474f387
commit 0c37aa9ea0
5 changed files with 29 additions and 21 deletions
+1 -4
View File
@@ -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