mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Type ranged number as flex var
This commit is contained in:
parent
26148b8b12
commit
5fea767411
1 changed files with 11 additions and 16 deletions
|
@ -1,4 +1,3 @@
|
|||
use crate::num::IntLitWidth;
|
||||
use crate::subs::{
|
||||
self, AliasVariables, Content, FlatType, GetSubsSlice, Label, Subs, SubsIndex, UnionLabels,
|
||||
UnionTags, UnsortedUnionLabels, Variable,
|
||||
|
@ -382,21 +381,17 @@ fn find_names_needed(
|
|||
);
|
||||
}
|
||||
}
|
||||
RangedNumber(range) => match range {
|
||||
crate::num::NumericRange::NumAtLeastEitherSign(IntLitWidth::I8)
|
||||
| crate::num::NumericRange::IntAtLeastEitherSign(IntLitWidth::I8) => {
|
||||
subs.set_content(variable, FlexVar(None));
|
||||
find_names_needed(
|
||||
variable,
|
||||
subs,
|
||||
roots,
|
||||
root_appearances,
|
||||
names_taken,
|
||||
find_under_alias,
|
||||
)
|
||||
}
|
||||
_ => {}
|
||||
},
|
||||
RangedNumber(range) => {
|
||||
subs.set_content(variable, FlexVar(None));
|
||||
find_names_needed(
|
||||
variable,
|
||||
subs,
|
||||
roots,
|
||||
root_appearances,
|
||||
names_taken,
|
||||
find_under_alias,
|
||||
);
|
||||
}
|
||||
Error | Structure(Erroneous(_)) | Structure(EmptyRecord) | Structure(EmptyTagUnion) => {
|
||||
// Errors and empty records don't need names.
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue