| OLD | NEW |
| 1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
| 2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
| 3 library engine.resolver; | 3 library engine.resolver; |
| 4 import 'dart:collection'; | 4 import 'dart:collection'; |
| 5 import 'java_core.dart'; | 5 import 'java_core.dart'; |
| 6 import 'java_engine.dart'; | 6 import 'java_engine.dart'; |
| 7 import 'instrumentation.dart'; | 7 import 'instrumentation.dart'; |
| 8 import 'source.dart'; | 8 import 'source.dart'; |
| 9 import 'error.dart'; | 9 import 'error.dart'; |
| 10 import 'scanner.dart' as sc; | 10 import 'scanner.dart' as sc; |
| (...skipping 8046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8057 if (type != null) { | 8057 if (type != null) { |
| 8058 node.type = type; | 8058 node.type = type; |
| 8059 } | 8059 } |
| 8060 } else { | 8060 } else { |
| 8061 if (isTypeNameInCatchClause(node)) { | 8061 if (isTypeNameInCatchClause(node)) { |
| 8062 reportError(StaticWarningCode.NON_TYPE_IN_CATCH_CLAUSE, typeName, [typeN
ame.name]); | 8062 reportError(StaticWarningCode.NON_TYPE_IN_CATCH_CLAUSE, typeName, [typeN
ame.name]); |
| 8063 } else if (isTypeNameInAsExpression(node)) { | 8063 } else if (isTypeNameInAsExpression(node)) { |
| 8064 reportError(StaticWarningCode.CAST_TO_NON_TYPE, typeName, [typeName.name
]); | 8064 reportError(StaticWarningCode.CAST_TO_NON_TYPE, typeName, [typeName.name
]); |
| 8065 } else if (isTypeNameInIsExpression(node)) { | 8065 } else if (isTypeNameInIsExpression(node)) { |
| 8066 reportError(StaticWarningCode.TYPE_TEST_NON_TYPE, typeName, [typeName.na
me]); | 8066 reportError(StaticWarningCode.TYPE_TEST_NON_TYPE, typeName, [typeName.na
me]); |
| 8067 } else { |
| 8068 ASTNode parent3 = typeName.parent; |
| 8069 while (parent3 is TypeName) { |
| 8070 parent3 = parent3.parent; |
| 8071 } |
| 8072 if (parent3 is ExtendsClause || parent3 is ImplementsClause || parent3 i
s WithClause || parent3 is ClassTypeAlias) { |
| 8073 } else { |
| 8074 reportError(StaticWarningCode.NOT_A_TYPE, typeName, [typeName.name]); |
| 8075 } |
| 8067 } | 8076 } |
| 8068 setElement(typeName, _dynamicType.element); | 8077 setElement(typeName, _dynamicType.element); |
| 8069 typeName.staticType = _dynamicType; | 8078 typeName.staticType = _dynamicType; |
| 8070 node.type = _dynamicType; | 8079 node.type = _dynamicType; |
| 8071 return null; | 8080 return null; |
| 8072 } | 8081 } |
| 8073 if (argumentList != null) { | 8082 if (argumentList != null) { |
| 8074 NodeList<TypeName> arguments2 = argumentList.arguments; | 8083 NodeList<TypeName> arguments2 = argumentList.arguments; |
| 8075 int argumentCount = arguments2.length; | 8084 int argumentCount = arguments2.length; |
| 8076 List<Type2> parameters = getTypeArguments(type); | 8085 List<Type2> parameters = getTypeArguments(type); |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8433 InterfaceType type = resolveType(typeName, nonTypeError); | 8442 InterfaceType type = resolveType(typeName, nonTypeError); |
| 8434 if (type != null) { | 8443 if (type != null) { |
| 8435 types.add(type); | 8444 types.add(type); |
| 8436 } | 8445 } |
| 8437 } | 8446 } |
| 8438 return new List.from(types); | 8447 return new List.from(types); |
| 8439 } | 8448 } |
| 8440 void setElement(Identifier typeName, Element element2) { | 8449 void setElement(Identifier typeName, Element element2) { |
| 8441 if (element2 != null) { | 8450 if (element2 != null) { |
| 8442 if (typeName is SimpleIdentifier) { | 8451 if (typeName is SimpleIdentifier) { |
| 8452 ((typeName as SimpleIdentifier)).staticElement = element2; |
| 8443 ((typeName as SimpleIdentifier)).element = element2; | 8453 ((typeName as SimpleIdentifier)).element = element2; |
| 8444 } else if (typeName is PrefixedIdentifier) { | 8454 } else if (typeName is PrefixedIdentifier) { |
| 8445 PrefixedIdentifier identifier = typeName as PrefixedIdentifier; | 8455 PrefixedIdentifier identifier = typeName as PrefixedIdentifier; |
| 8456 identifier.identifier.staticElement = element2; |
| 8446 identifier.identifier.element = element2; | 8457 identifier.identifier.element = element2; |
| 8447 SimpleIdentifier prefix2 = identifier.prefix; | 8458 SimpleIdentifier prefix2 = identifier.prefix; |
| 8448 Element prefixElement = nameScope.lookup(prefix2, definingLibrary); | 8459 Element prefixElement = nameScope.lookup(prefix2, definingLibrary); |
| 8449 if (prefixElement != null) { | 8460 if (prefixElement != null) { |
| 8461 prefix2.staticElement = prefixElement; |
| 8450 prefix2.element = prefixElement; | 8462 prefix2.element = prefixElement; |
| 8451 } | 8463 } |
| 8452 } | 8464 } |
| 8453 } | 8465 } |
| 8454 } | 8466 } |
| 8455 | 8467 |
| 8456 /** | 8468 /** |
| 8457 * Set the return type and parameter type information for the given function t
ype based on the | 8469 * Set the return type and parameter type information for the given function t
ype based on the |
| 8458 * given return type and parameter elements. | 8470 * given return type and parameter elements. |
| 8459 * @param functionType the function type to be filled in | 8471 * @param functionType the function type to be filled in |
| (...skipping 4295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12755 this._type = type; | 12767 this._type = type; |
| 12756 this._message = message; | 12768 this._message = message; |
| 12757 } | 12769 } |
| 12758 ErrorSeverity get errorSeverity => _type.severity; | 12770 ErrorSeverity get errorSeverity => _type.severity; |
| 12759 String get message => _message; | 12771 String get message => _message; |
| 12760 ErrorType get type => _type; | 12772 ErrorType get type => _type; |
| 12761 int compareTo(ResolverErrorCode other) => ordinal - other.ordinal; | 12773 int compareTo(ResolverErrorCode other) => ordinal - other.ordinal; |
| 12762 int get hashCode => ordinal; | 12774 int get hashCode => ordinal; |
| 12763 String toString() => name; | 12775 String toString() => name; |
| 12764 } | 12776 } |
| OLD | NEW |