@@ -1157,7 +1157,7 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) permitWeakResolution ndeep
11571157 IsRecdFieldAccessible amap m AccessibleFromEverywhere rfinfo.RecdFieldRef&&
11581158not rfinfo.LiteralValue.IsSome&&
11591159not rfinfo.RecdField.IsCompilerGenerated->
1160- Some( TTraitSolvedRecdProp( rfinfo, isSetProp))
1160+ Some( TTraitSolvedRecdProp( rfinfo, isSetProp), rfinfo.FieldType )
11611161| _ -> None)
11621162match propswith
11631163| [ prop] -> Some prop
@@ -1210,9 +1210,9 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) permitWeakResolution ndeep
12101210 CollectThenUndo( fun trace -> ResolveOverloading csenv( WithTrace( trace)) nm ndeeptrue ( 0 , 0 ) AccessibleFromEverywhere calledMethGroupfalse ( Some rty))
12111211
12121212match recdPropSearch, methOverloadResultwith
1213- | Somea , None->
1214- // OK, the constraint is solved by a record property
1215- ResultDa
1213+ | Some( sln , rty2 ) , None->
1214+ // OK, the constraint is solved by a record property. Assert that the return types match.
1215+ SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty rty2 ++ ( fun () -> ResultDsln )
12161216| None, Some( calledMeth: CalledMeth<_>) ->
12171217// OK, the constraint is solved.
12181218// Re-run without undo to commit the inference equations. Throw errors away