Commit Graph

3 Commits

Author SHA1 Message Date
Holly Borla
8ba51888c6 [ConstraintSystem] Before applying the result builder transform to a
function body, map the result builder type into context.

This was already done for inferred result builder attributes; now,
the constraint system will map the builder type into context for all
result builder attributes applied to computed properties/functions.
2022-08-29 22:13:13 -07:00
Holly Borla
17def18c37 [Result Builders] When inferring result builder attributes on value witnesses,
always map type parameters into context.

For result builders applied to function/variable/subscript bodies, the builder
type will only be used for calls to `buildBlock` and friends inside the body,
for which we always want the contextual type of the builder, not the interface
type.
2021-10-29 19:21:50 -07:00
Holly Borla
89e0f45e90 [Result Builders] Correct type witness substitution when computing inferred
result builder attributes from protocol requirements.
2021-10-29 16:16:25 -07:00