mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-29 01:14:40 +00:00
Fix issue #130; allow conversion from any pointer to uintptr and vice versa
This commit is contained in:
@@ -1759,11 +1759,11 @@ bool check_is_castable_to(Checker *c, Operand *operand, Type *y) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// (u)int <-> rawptr
|
||||
if (is_type_uintptr(src) && is_type_rawptr(dst)) {
|
||||
// (u)int <-> pointer
|
||||
if (is_type_uintptr(src) && is_type_pointer(dst)) {
|
||||
return true;
|
||||
}
|
||||
if (is_type_rawptr(src) && is_type_uintptr(dst)) {
|
||||
if (is_type_pointer(src) && is_type_uintptr(dst)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user