We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39ddadc commit d666b04Copy full SHA for d666b04
include/swift/Sema/ConstraintSystem.h
@@ -3014,6 +3014,20 @@ class ConstraintSystem {
3014
return nullptr;
3015
}
3016
3017
+ TypeVariableType *getKeyPathValueType(const KeyPathExpr *keyPath) const {
3018
+ auto result = getKeyPathValueTypeIfAvailable(keyPath);
3019
+ assert(result);
3020
+ return result;
3021
+ }
3022
+
3023
+ TypeVariableType *
3024
+ getKeyPathValueTypeIfAvailable(const KeyPathExpr *keyPath) const {
3025
+ auto result = KeyPaths.find(keyPath);
3026
+ if (result != KeyPaths.end())
3027
+ return std::get<1>(result->second);
3028
+ return nullptr;
3029
3030
3031
TypeBase* getFavoredType(Expr *E) {
3032
assert(E != nullptr);
3033
return this->FavoredTypes[E];
0 commit comments