mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
Include floats in bounds for unspecified numbers
This commit is contained in:
parent
3fffca48bb
commit
c5d918e68c
8 changed files with 129 additions and 180 deletions
|
@ -324,8 +324,11 @@ impl TypedNumericBound for NumericBound {
|
|||
fn bounded_range(&self) -> Vec<Variable> {
|
||||
match self {
|
||||
NumericBound::None => vec![],
|
||||
NumericBound::Int(ib) => ib.bounded_range(),
|
||||
NumericBound::Float(fb) => fb.bounded_range(),
|
||||
&NumericBound::AtLeastIntOrFloat { sign, width } => {
|
||||
let mut range = IntBound::AtLeast { sign, width }.bounded_range();
|
||||
range.extend_from_slice(&[Variable::F32, Variable::F64, Variable::DEC]);
|
||||
range
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue