mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-13 12:36:36 -04:00
Allow cast from float to complex
This commit is contained in:
1 parent
12c1291805
commit
3e04b45106
1 file changed
+3
@@ -2453,6 +2453,9 @@ bool check_is_castable_to(CheckerContext *c, Operand *operand, Type *y) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (is_type_float(src) && is_type_complex(dst)) {
|
||||
return true;
|
||||
}
|
||||
if (is_type_float(src) && is_type_quaternion(dst)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user