mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 23:31:12 +00:00
fix: float error in repl
This commit is contained in:
parent
9dbcfb7a97
commit
b510d6e94d
5 changed files with 31 additions and 33 deletions
|
@ -445,7 +445,7 @@ fn test_at_path<'a>(selected_path: &Path, branch: &Branch<'a>, all_tests: &mut V
|
|||
num_alts: union.alternatives.len(),
|
||||
});
|
||||
}
|
||||
IntLiteral(v) => {
|
||||
IntLiteral(_, v) => {
|
||||
all_tests.push(guarded(IsInt(*v)));
|
||||
}
|
||||
FloatLiteral(_, v) => {
|
||||
|
@ -636,7 +636,7 @@ fn to_relevant_branch_help<'a>(
|
|||
_ => None,
|
||||
},
|
||||
|
||||
IntLiteral(int) => match test {
|
||||
IntLiteral(_, int) => match test {
|
||||
IsInt(is_int) if int == *is_int => {
|
||||
start.extend(end);
|
||||
Some(Branch {
|
||||
|
@ -740,7 +740,7 @@ fn needs_tests<'a>(pattern: &Pattern<'a>) -> bool {
|
|||
| AppliedTag { .. }
|
||||
| BitLiteral { .. }
|
||||
| EnumLiteral { .. }
|
||||
| IntLiteral(_)
|
||||
| IntLiteral(_, _)
|
||||
| FloatLiteral(_, _)
|
||||
| StrLiteral(_) => true,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue