mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-31 02:13:45 +00:00
fix errors with alias analysis
This commit is contained in:
parent
6302a8d4b5
commit
2e2b687fac
1 changed files with 4 additions and 2 deletions
|
@ -1785,7 +1785,9 @@ fn solve(
|
|||
);
|
||||
|
||||
if let Success { .. } = unify(
|
||||
&mut UEnv::new(subs),
|
||||
// TODO: if we don't clone and a later branch matches, we will get a failure in alias analysis.
|
||||
// That said, I assume cloning is expensive and should be avoided.
|
||||
&mut UEnv::new(&mut subs.clone()),
|
||||
actual,
|
||||
Variable::LIST_U8,
|
||||
Mode::EQ,
|
||||
|
@ -1794,7 +1796,7 @@ fn solve(
|
|||
// List U8 always valid.
|
||||
state
|
||||
} else if let Success { .. } = unify(
|
||||
&mut UEnv::new(subs),
|
||||
&mut UEnv::new(&mut subs.clone()),
|
||||
actual,
|
||||
Variable::STR,
|
||||
Mode::EQ,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue