mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-13 12:36:36 -04:00
Update demo for both subtyping and union based Entity
This commit is contained in:
1 parent
3868a9a0f0
commit
115e6e7f9e
2 files changed
+102
-91
No files matched your search
@@ -3338,6 +3338,7 @@ bool check_is_castable_to(Checker *c, Operand *operand, Type *y) {
|
||||
|
||||
// Cast between pointers
|
||||
if (is_type_pointer(src) && is_type_pointer(dst)) {
|
||||
#if 0
|
||||
Type *s = base_type(type_deref(src));
|
||||
if (is_type_union(s)) {
|
||||
// NOTE(bill): Should the error be here?!
|
||||
@@ -3349,6 +3350,7 @@ bool check_is_castable_to(Checker *c, Operand *operand, Type *y) {
|
||||
gb_string_free(xs);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user