mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-11 15:27:06 -04:00
Fix issue #130; allow conversion from any pointer to uintptr and vice versa
This commit is contained in:
1 parent
529d1c78c7
commit
fcc8b89e6b
2 files changed
+8
-8
No files matched your search
+3
-3
@@ -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