[CSFix] Attempt to replace .subscript(...) with subscript operator

If there are no members named "subscript" available, let's try to
replace it with subscript operator with might be what was intended.
This commit is contained in:
Pavel Yaskevich
2019-01-05 14:53:34 -08:00
parent 5636cd3769
commit f032b9c57c
3 changed files with 44 additions and 5 deletions

View File

@@ -235,3 +235,12 @@ InsertExplicitCall *InsertExplicitCall::create(ConstraintSystem &cs,
ConstraintLocator *locator) {
return new (cs.getAllocator()) InsertExplicitCall(cs, locator);
}
bool UseSubscriptOperator::diagnose(Expr *root, bool asNote) const {
return false;
}
UseSubscriptOperator *UseSubscriptOperator::create(ConstraintSystem &cs,
ConstraintLocator *locator) {
return new (cs.getAllocator()) UseSubscriptOperator(cs, locator);
}