Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: pkg/analyzer/lib/src/generated/error_verifier.dart

Issue 1758913002: Add instantiate method on ParameterizedType and InterfaceType. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/generated/constant.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/error_verifier.dart
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index 32b4d315e4cc37d44d3bea57b6665dd7a1428a8c..2bc374be1fbeb3d5032338e1af3909d1b3ceb99f 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -356,8 +356,7 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
Object visitBinaryExpression(BinaryExpression node) {
Token operator = node.operator;
TokenType type = operator.type;
- if (type == TokenType.AMPERSAND_AMPERSAND ||
- type == TokenType.BAR_BAR) {
+ if (type == TokenType.AMPERSAND_AMPERSAND || type == TokenType.BAR_BAR) {
String lexeme = operator.lexeme;
_checkForAssignability(node.leftOperand, _boolType,
StaticTypeWarningCode.NON_BOOL_OPERAND, [lexeme]);
@@ -2842,8 +2841,7 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
if (type.element.isAbstract) {
ConstructorElement element = expression.staticElement;
if (element != null && !element.isFactory) {
- if ((expression.keyword as KeywordToken).keyword ==
- Keyword.CONST) {
+ if ((expression.keyword as KeywordToken).keyword == Keyword.CONST) {
_errorReporter.reportErrorForNode(
StaticWarningCode.CONST_WITH_ABSTRACT_CLASS, typeName);
} else {
@@ -5670,10 +5668,10 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
impliedReturnType = staticYieldedType;
} else if (_enclosingFunction.isAsynchronous) {
impliedReturnType =
- _typeProvider.streamType.substitute4(<DartType>[staticYieldedType]);
+ _typeProvider.streamType.instantiate(<DartType>[staticYieldedType]);
} else {
impliedReturnType =
- _typeProvider.iterableType.substitute4(<DartType>[staticYieldedType]);
+ _typeProvider.iterableType.instantiate(<DartType>[staticYieldedType]);
}
if (!_typeSystem.isAssignableTo(impliedReturnType, declaredReturnType)) {
_errorReporter.reportTypeErrorForNode(
@@ -5783,7 +5781,7 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
}
DartType staticReturnType = getStaticType(returnExpression);
if (staticReturnType != null && _enclosingFunction.isAsynchronous) {
- return _typeProvider.futureType.substitute4(
+ return _typeProvider.futureType.instantiate(
<DartType>[staticReturnType.flattenFutures(_typeSystem)]);
}
return staticReturnType;
« no previous file with comments | « pkg/analyzer/lib/src/generated/constant.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698