From b390db109cadd5028ae76fa1f4661735d72291ae Mon Sep 17 00:00:00 2001 From: Markus Westerlind Date: Fri, 25 Jan 2019 16:46:42 +0100 Subject: [PATCH] fix(check): Take the parameters of record type fields into account when inserting forall Fixes the use of replace_generics in the next commit --- check/src/typecheck.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/check/src/typecheck.rs b/check/src/typecheck.rs index af221e78c3..498d6a7381 100644 --- a/check/src/typecheck.rs +++ b/check/src/typecheck.rs @@ -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(),