mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
Fix gen tests
This commit is contained in:
parent
680bf8e0b7
commit
ff3596505e
2 changed files with 7 additions and 3 deletions
|
@ -36,7 +36,7 @@ fn str_split_empty_delimiter() {
|
||||||
Str.countGraphemes str
|
Str.countGraphemes str
|
||||||
|
|
||||||
_ ->
|
_ ->
|
||||||
-1
|
1729
|
||||||
|
|
||||||
"#
|
"#
|
||||||
),
|
),
|
||||||
|
@ -66,7 +66,7 @@ fn str_split_bigger_delimiter_small_str() {
|
||||||
Str.countGraphemes str
|
Str.countGraphemes str
|
||||||
|
|
||||||
_ ->
|
_ ->
|
||||||
-1
|
1729
|
||||||
|
|
||||||
"#
|
"#
|
||||||
),
|
),
|
||||||
|
|
|
@ -88,6 +88,10 @@ impl Mode {
|
||||||
debug_assert!(!self.contains(Mode::EQ | Mode::PRESENT));
|
debug_assert!(!self.contains(Mode::EQ | Mode::PRESENT));
|
||||||
self.contains(Mode::PRESENT)
|
self.contains(Mode::PRESENT)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn as_eq(self) -> Self {
|
||||||
|
(self - Mode::PRESENT) | Mode::EQ
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
@ -405,7 +409,7 @@ fn unify_structure(
|
||||||
Alias(_, _, real_var) => {
|
Alias(_, _, real_var) => {
|
||||||
// NB: not treating this as a presence constraint seems pivotal! I
|
// NB: not treating this as a presence constraint seems pivotal! I
|
||||||
// can't quite figure out why, but it doesn't seem to impact other types.
|
// can't quite figure out why, but it doesn't seem to impact other types.
|
||||||
unify_pool(subs, pool, ctx.first, *real_var, Mode::EQ)
|
unify_pool(subs, pool, ctx.first, *real_var, ctx.mode.as_eq())
|
||||||
}
|
}
|
||||||
RangedNumber(real_var, _) => unify_pool(subs, pool, ctx.first, *real_var, ctx.mode),
|
RangedNumber(real_var, _) => unify_pool(subs, pool, ctx.first, *real_var, ctx.mode),
|
||||||
Error => merge(subs, ctx, Error),
|
Error => merge(subs, ctx, Error),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue