Skip to content

Commit

Permalink
fix(check): Take the parameters of record type fields into account wh…
Browse files Browse the repository at this point in the history
…en inserting forall

Fixes the use of replace_generics in the next commit
  • Loading branch information
Marwes committed Jan 27, 2019
1 parent 4e53ba1 commit b390db1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion check/src/typecheck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2531,7 +2531,12 @@ impl<'a> Typecheck<'a> {
} => {
let new_types = types::walk_move_types(types, |field| {
let typ = self
.create_unifiable_signature2(field.typ.unresolved_type())
.create_unifiable_signature_with(
field.typ.params().iter().map(|param| {
(param.id.clone(), field.typ.unresolved_type().clone())
}),
field.typ.unresolved_type(),
)
.unwrap_or_else(|| field.typ.unresolved_type().clone());
Some(Field::new(
field.name.clone(),
Expand Down

0 comments on commit b390db1

Please sign in to comment.