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 {
12931293 // / Don't try to type check closure bodies, and leave them unchecked. This is
12941294 // / used for source tooling functionalities.
12951295 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 ,
12961301};
12971302
12981303// / Options that affect the constraint system as a whole.
@@ -3057,6 +3062,12 @@ class ConstraintSystem {
30573062 return Options.contains (ConstraintSystemFlags::ReusePrecheckedType);
30583063 }
30593064
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+
30603071 // / Log and record the application of the fix. Return true iff any
30613072 // / subsequent solution would be worse than the best known solution.
30623073 bool recordFix (ConstraintFix *fix, unsigned impact = 1 );
You can’t perform that action at this time.
0 commit comments