mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CSClosure] Teach syntactic element constraint generator about result builders
Closures and functions that have result builder transform applied have to be handled specially by the constraint generator because transformed body is associated with the context (function or closure) only during solution application.
This commit is contained in:
@@ -3734,6 +3734,14 @@ public:
|
||||
return known->second;
|
||||
}
|
||||
|
||||
Optional<AppliedBuilderTransform>
|
||||
getAppliedResultBuilderTransform(AnyFunctionRef fn) const {
|
||||
auto transformed = resultBuilderTransformed.find(fn);
|
||||
if (transformed != resultBuilderTransformed.end())
|
||||
return transformed->second;
|
||||
return None;
|
||||
}
|
||||
|
||||
void setCaseLabelItemInfo(const CaseLabelItem *item, CaseLabelItemInfo info) {
|
||||
assert(item != nullptr);
|
||||
assert(caseLabelItems.count(item) == 0);
|
||||
|
||||
Reference in New Issue
Block a user