mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
Merge pull request #1610 from rtfeldman/captured-symbols-layout-error
Captured symbols layout error
This commit is contained in:
commit
349b799d00
2 changed files with 11 additions and 11 deletions
|
@ -4684,14 +4684,16 @@ pub fn from_can<'a>(
|
||||||
);
|
);
|
||||||
CapturedSymbols::None
|
CapturedSymbols::None
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(_) => {
|
||||||
debug_assert!(
|
// just allow this. see https://github.com/rtfeldman/roc/issues/1585
|
||||||
captured_symbols.is_empty(),
|
if captured_symbols.is_empty() {
|
||||||
"{:?}, {:?}",
|
|
||||||
&captured_symbols,
|
|
||||||
e
|
|
||||||
);
|
|
||||||
CapturedSymbols::None
|
CapturedSymbols::None
|
||||||
|
} else {
|
||||||
|
let mut temp =
|
||||||
|
Vec::from_iter_in(captured_symbols, env.arena);
|
||||||
|
temp.sort();
|
||||||
|
CapturedSymbols::Captured(temp.into_bump_slice())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2712,7 +2712,6 @@ fn int_literal_not_specialized() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[ignore]
|
|
||||||
fn unresolved_tvar_when_capture_is_unused() {
|
fn unresolved_tvar_when_capture_is_unused() {
|
||||||
// see https://github.com/rtfeldman/roc/issues/1585
|
// see https://github.com/rtfeldman/roc/issues/1585
|
||||||
assert_evals_to!(
|
assert_evals_to!(
|
||||||
|
@ -2725,8 +2724,7 @@ fn unresolved_tvar_when_capture_is_unused() {
|
||||||
r : Bool
|
r : Bool
|
||||||
r = False
|
r = False
|
||||||
|
|
||||||
# underscore does not change the problem, maybe it's type-related? We don 't really know what `Green` refers to below
|
p1 = (\_ -> r == (1 == 1))
|
||||||
p1 = (\x -> r == (1 == 1))
|
|
||||||
oneOfResult = List.map [p1] (\p -> p Green)
|
oneOfResult = List.map [p1] (\p -> p Green)
|
||||||
|
|
||||||
when oneOfResult is
|
when oneOfResult is
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue