mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-11 05:34:11 +03:00
Merge pull request #1610 from rtfeldman/captured-symbols-layout-error
Captured symbols layout error
This commit is contained in:
commit
349b799d00
@ -4684,14 +4684,16 @@ pub fn from_can<'a>(
|
||||
);
|
||||
CapturedSymbols::None
|
||||
}
|
||||
Err(e) => {
|
||||
debug_assert!(
|
||||
captured_symbols.is_empty(),
|
||||
"{:?}, {:?}",
|
||||
&captured_symbols,
|
||||
e
|
||||
);
|
||||
Err(_) => {
|
||||
// just allow this. see https://github.com/rtfeldman/roc/issues/1585
|
||||
if captured_symbols.is_empty() {
|
||||
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]
|
||||
#[ignore]
|
||||
fn unresolved_tvar_when_capture_is_unused() {
|
||||
// see https://github.com/rtfeldman/roc/issues/1585
|
||||
assert_evals_to!(
|
||||
@ -2725,8 +2724,7 @@ fn unresolved_tvar_when_capture_is_unused() {
|
||||
r : Bool
|
||||
r = False
|
||||
|
||||
# underscore does not change the problem, maybe it's type-related? We don 't really know what `Green` refers to below
|
||||
p1 = (\x -> r == (1 == 1))
|
||||
p1 = (\_ -> r == (1 == 1))
|
||||
oneOfResult = List.map [p1] (\p -> p Green)
|
||||
|
||||
when oneOfResult is
|
||||
|
Loading…
Reference in New Issue
Block a user