mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
fix problem in uniqueness inference
This commit is contained in:
parent
2e1e87ad6a
commit
a0c6952258
2 changed files with 9 additions and 2 deletions
|
@ -1914,6 +1914,11 @@ fn annotation_to_attr_type(
|
||||||
arg_vars.extend(closure_vars);
|
arg_vars.extend(closure_vars);
|
||||||
arg_vars.push(uniq_var);
|
arg_vars.push(uniq_var);
|
||||||
|
|
||||||
|
match **closure {
|
||||||
|
Type::Variable(c) => arg_vars.push(c),
|
||||||
|
_ => unreachable!("closure must contain a type variable"),
|
||||||
|
}
|
||||||
|
|
||||||
(
|
(
|
||||||
arg_vars,
|
arg_vars,
|
||||||
attr_type(
|
attr_type(
|
||||||
|
|
|
@ -158,7 +158,7 @@ impl fmt::Debug for Type {
|
||||||
match self {
|
match self {
|
||||||
Type::EmptyRec => write!(f, "{{}}"),
|
Type::EmptyRec => write!(f, "{{}}"),
|
||||||
Type::EmptyTagUnion => write!(f, "[]"),
|
Type::EmptyTagUnion => write!(f, "[]"),
|
||||||
Type::Function(args, _closure, ret) => {
|
Type::Function(args, closure, ret) => {
|
||||||
write!(f, "Fn(")?;
|
write!(f, "Fn(")?;
|
||||||
|
|
||||||
for (index, arg) in args.iter().enumerate() {
|
for (index, arg) in args.iter().enumerate() {
|
||||||
|
@ -169,7 +169,9 @@ impl fmt::Debug for Type {
|
||||||
arg.fmt(f)?;
|
arg.fmt(f)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
write!(f, " -> ")?;
|
write!(f, " -")?;
|
||||||
|
closure.fmt(f)?;
|
||||||
|
write!(f, "-> ")?;
|
||||||
|
|
||||||
ret.fmt(f)?;
|
ret.fmt(f)?;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue