Commit Graph

11 Commits

Author SHA1 Message Date
Holly Borla
cc65d2112d [ConstraintSystem] Fix a few places where we should consider
`matchTypes` a success without applying new constraint fixes
due to the presence of holes.
2019-11-05 09:16:57 -08:00
Doug Gregor
b4e80cfd90 [Constraint graph] Enable one-way constraints in function builders.
Enable one-way constraints by default for function builders, finishing
rdar://problem/50150793.
2019-08-19 22:49:15 -07:00
John McCall
a183f762cd Address review feedback on the function-builders-on-funcs/vars patch. 2019-06-11 17:34:45 -07:00
John McCall
999d98acb1 Fix treatment of single-line getters with function builders.
rdar://50561122
2019-06-11 17:34:45 -07:00
John McCall
952eb9d8f9 Allow function-builder attributes on funcs and computed vars.
rdar://50150690
2019-06-11 17:34:45 -07:00
Doug Gregor
b7bbf4ca1a [Function builders] Allow uses of generic function builders.
Use the opened type from the callee declaration to open up references to
generic function builders that contain type parameters. This allows general
use of generic function builders.
2019-06-11 17:34:45 -07:00
John McCall
007842261f Rework the requests for getting a parameter's function-builder type.
Turn the generic CustomAttrTypeRequest into a helper function and
introduce a FunctionBuilderTypeRequest that starts from a ParamDecl.
This has better caching characteristics and also means we only need to
do a single cache lookup in order to resolve the type in the normal path.
It also means we don't need as much parameterization in the cache.

In addition, check that the parameter has function type in the request,
not just when late-checking the attribute, and add a check that it isn't
an autoclosure.
2019-06-11 17:34:44 -07:00
John McCall
2268939f3b Underscore _functionBuilder. 2019-06-11 17:34:44 -07:00
John McCall
93b3320196 Make getFunctionBuilderType() return a Type. 2019-06-11 17:34:44 -07:00
John McCall
15e7fa0983 Ignore unresolvable custom attributes in the function-builder checker. 2019-06-11 17:34:44 -07:00
John McCall
1e4f5f7750 Add @functionBuilder and check its applications to parameters. 2019-06-11 17:34:44 -07:00