File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1293,6 +1293,11 @@ enum class ConstraintSystemFlags {
1293
1293
// / Don't try to type check closure bodies, and leave them unchecked. This is
1294
1294
// / used for source tooling functionalities.
1295
1295
LeaveClosureBodyUnchecked = 0x20 ,
1296
+
1297
+ // / If set, we are solving specifically to determine the type of a
1298
+ // / CodeCompletionExpr, and should continue in the presence of errors wherever
1299
+ // / possible.
1300
+ ForCodeCompletion = 0x40 ,
1296
1301
};
1297
1302
1298
1303
// / Options that affect the constraint system as a whole.
@@ -3057,6 +3062,12 @@ class ConstraintSystem {
3057
3062
return Options.contains (ConstraintSystemFlags::ReusePrecheckedType);
3058
3063
}
3059
3064
3065
+ // / Whether we are solving to determine the possible types of a
3066
+ // / \c CodeCompletionExpr.
3067
+ bool isForCodeCompletion () const {
3068
+ return Options.contains (ConstraintSystemFlags::ForCodeCompletion);
3069
+ }
3070
+
3060
3071
// / Log and record the application of the fix. Return true iff any
3061
3072
// / subsequent solution would be worse than the best known solution.
3062
3073
bool recordFix (ConstraintFix *fix, unsigned impact = 1 );
You can’t perform that action at this time.
0 commit comments