add implicit type casting #1

Open
opened 2019-09-27 15:07:12 +00:00 by luna · 0 comments
Owner

i32 values can be return values for i64, or, this:

fn blah() i64 {
    return 123; // is i32 by default
}

should compile correctly.

doing a check for "if i32 is superset of i64" tackles the issue at an analysis level, but not at a codegen level. we must cast the i32 into an i64 with the i32 value when wanted.

i32 values can be return values for i64, or, this: ``` fn blah() i64 { return 123; // is i32 by default } ``` should compile correctly. doing a check for "if i32 is superset of i64" tackles the issue at an analysis level, **but not at a codegen level.** we must cast the i32 into an i64 with the i32 value when wanted.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: luna/rayoko#1
No description provided.