You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.
/// Records this type variable as an int var so it can be special-cased in the later stages of
/// type checking. No variable should be both an int var and a real var.
pubfnty_var_is_int(&mutself,ty_var:TyVar){
self.int_vars.insert(ty_var);
}
/// Records this type variable as an real var so it can be special-cased in the later stages of
/// type checking. No variable should be both an int var and a real var.
pubfnty_var_is_real(&mutself,ty_var:TyVar){
self.real_vars.insert(ty_var);
}
No variable should be both an int var and a real var.
This is not valid though because 12 is both a valid integer literal and a valid real literal. We should go through the code and remove this assumption.
A variable can be both an int var and a real var. In that case, the variable must be in the intersection of the set of valid types for both int and real vars.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Right now we assume that no types can be both int vars and real vars:
dino/src/tycheck/constraints.rs
Lines 134 to 144 in 78a25b4
This is not valid though because
12
is both a valid integer literal and a valid real literal. We should go through the code and remove this assumption.A variable can be both an int var and a real var. In that case, the variable must be in the intersection of the set of valid types for both int and real vars.
The text was updated successfully, but these errors were encountered: