Commits

Arnold Schwaighofer committed d24e5b785b2
IRGen: Fix partial apply of functions with parametric return type In partial apply forwarding thunks, we need to cast dependent result types of polymorphic function calls to the specialized type. For example for: %0 = function_ref @closure : $@thin <C where C : Base> (@owned Base) -> @owned C %1 = partial_apply %0<Sub>() : $@thin <C where C : Base> (@owned Base) -> @owned C We need to cast the result type: define %C3Sub* @_TPA_closure(%C4Base*) { entry: %1 = call %swift.type* @_TMaC3Sub() %2 = tail call %C4Base* @closure(%C4Base* %0, %swift.type* %1) --> %3 = bitcast %C4Base* %2 to %C3Sub* ret %C3Sub* %3 } rdar://19930705 Swift SVN r25521