@@ -2226,39 +2226,6 @@ getTypeOfExpressionWithoutApplying(Expr *&expr, DeclContext *dc,
2226
2226
return exprType;
2227
2227
}
2228
2228
2229
- void TypeChecker::getPossibleTypesOfExpressionWithoutApplying (
2230
- Expr *&expr, DeclContext *dc, SmallPtrSetImpl<TypeBase *> &types,
2231
- FreeTypeVariableBinding allowFreeTypeVariables,
2232
- ExprTypeCheckListener *listener) {
2233
- auto &Context = dc->getASTContext ();
2234
- FrontendStatsTracer StatsTracer (Context.Stats ,
2235
- " get-possible-types-no-apply" , expr);
2236
- PrettyStackTraceExpr stackTrace (Context, " type-checking" , expr);
2237
-
2238
- // Construct a constraint system from this expression.
2239
- ConstraintSystemOptions options;
2240
- options |= ConstraintSystemFlags::ReturnAllDiscoveredSolutions;
2241
- options |= ConstraintSystemFlags::SuppressDiagnostics;
2242
-
2243
- ConstraintSystem cs (dc, options);
2244
-
2245
- // Attempt to solve the constraint system.
2246
- const Type originalType = expr->getType ();
2247
- if (originalType && originalType->hasError ())
2248
- expr->setType (Type ());
2249
-
2250
- SolutionApplicationTarget target (
2251
- expr, dc, CTP_Unused, Type (), /* isDiscarded=*/ false );
2252
- if (auto viable = cs.solve (target, listener, allowFreeTypeVariables)) {
2253
- expr = target.getAsExpr ();
2254
- for (auto &solution : *viable) {
2255
- auto exprType = solution.simplifyType (cs.getType (expr));
2256
- assert (exprType && !exprType->hasTypeVariable ());
2257
- types.insert (exprType.getPointer ());
2258
- }
2259
- }
2260
- }
2261
-
2262
2229
static FunctionType *
2263
2230
getTypeOfCompletionOperatorImpl (DeclContext *DC, Expr *expr,
2264
2231
ConcreteDeclRef &referencedDecl) {
0 commit comments