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

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

Issue 1131423002: Clean up many generated constructors (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Comment change Created 5 years, 7 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/parser.dart ('k') | pkg/analyzer/lib/src/generated/scanner.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 7e3842643a6c2b010b15db96b6227b5ba91ba4f9..9662d7baaa05c29991b4fe710581e6db1e80d17a 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -743,12 +743,12 @@ class ClassScope extends EnclosedScope {
AnalysisError getErrorForDuplicate(Element existing, Element duplicate) {
if (existing is PropertyAccessorElement && duplicate is MethodElement) {
if (existing.nameOffset < duplicate.nameOffset) {
- return new AnalysisError.con2(duplicate.source, duplicate.nameOffset,
+ return new AnalysisError(duplicate.source, duplicate.nameOffset,
duplicate.displayName.length,
CompileTimeErrorCode.METHOD_AND_GETTER_WITH_SAME_NAME,
[existing.displayName]);
} else {
- return new AnalysisError.con2(existing.source, existing.nameOffset,
+ return new AnalysisError(existing.source, existing.nameOffset,
existing.displayName.length,
CompileTimeErrorCode.GETTER_AND_METHOD_WITH_SAME_NAME,
[existing.displayName]);
@@ -1268,7 +1268,7 @@ class ConstantVerifier extends RecursiveAstVisitor<Object> {
}
}
VariableElementImpl element = parameter.element as VariableElementImpl;
- element.evaluationResult = new EvaluationResultImpl.con1(result);
+ element.evaluationResult = new EvaluationResultImpl(result);
}
}
}
@@ -1716,10 +1716,10 @@ class DeadCodeVerifier extends RecursiveAstVisitor<Object> {
EvaluationResultImpl _getConstantBooleanValue(Expression expression) {
if (expression is BooleanLiteral) {
if (expression.value) {
- return new EvaluationResultImpl.con1(
+ return new EvaluationResultImpl(
new DartObjectImpl(null, BoolState.from(true)));
} else {
- return new EvaluationResultImpl.con1(
+ return new EvaluationResultImpl(
new DartObjectImpl(null, BoolState.from(false)));
}
}
@@ -2450,7 +2450,7 @@ class ElementBuilder extends RecursiveAstVisitor<Object> {
ClassElementImpl element = new ClassElementImpl.forNode(className);
List<TypeParameterElement> typeParameters = holder.typeParameters;
List<DartType> typeArguments = _createTypeParameterTypes(typeParameters);
- InterfaceTypeImpl interfaceType = new InterfaceTypeImpl.con1(element);
+ InterfaceTypeImpl interfaceType = new InterfaceTypeImpl(element);
interfaceType.typeArguments = typeArguments;
element.type = interfaceType;
List<ConstructorElement> constructors = holder.constructors;
@@ -2505,7 +2505,7 @@ class ElementBuilder extends RecursiveAstVisitor<Object> {
List<TypeParameterElement> typeParameters = holder.typeParameters;
element.typeParameters = typeParameters;
List<DartType> typeArguments = _createTypeParameterTypes(typeParameters);
- InterfaceTypeImpl interfaceType = new InterfaceTypeImpl.con1(element);
+ InterfaceTypeImpl interfaceType = new InterfaceTypeImpl(element);
interfaceType.typeArguments = typeArguments;
element.type = interfaceType;
// set default constructor
@@ -2629,7 +2629,7 @@ class ElementBuilder extends RecursiveAstVisitor<Object> {
SimpleIdentifier enumName = node.name;
ClassElementImpl enumElement = new ClassElementImpl.forNode(enumName);
enumElement.enum2 = true;
- InterfaceTypeImpl enumType = new InterfaceTypeImpl.con1(enumElement);
+ InterfaceTypeImpl enumType = new InterfaceTypeImpl(enumElement);
enumElement.type = enumType;
_currentHolder.addEnum(enumElement);
enumName.staticElement = enumElement;
@@ -2813,7 +2813,7 @@ class ElementBuilder extends RecursiveAstVisitor<Object> {
element.setVisibleRange(functionEnd, blockEnd - functionEnd - 1);
}
}
- FunctionTypeImpl type = new FunctionTypeImpl.con1(element);
+ FunctionTypeImpl type = new FunctionTypeImpl(element);
if (_functionTypesToFix != null) {
_functionTypesToFix.add(type);
}
@@ -2835,7 +2835,7 @@ class ElementBuilder extends RecursiveAstVisitor<Object> {
new FunctionTypeAliasElementImpl.forNode(aliasName);
element.parameters = parameters;
element.typeParameters = typeParameters;
- FunctionTypeImpl type = new FunctionTypeImpl.con2(element);
+ FunctionTypeImpl type = new FunctionTypeImpl.forTypedef(element);
type.typeArguments = _createTypeParameterTypes(typeParameters);
element.type = type;
_currentHolder.addTypeAlias(element);
@@ -3074,7 +3074,7 @@ class ElementBuilder extends RecursiveAstVisitor<Object> {
SimpleIdentifier fieldName = node.name;
FieldElementImpl field;
if ((isConst || isFinal) && hasInitializer) {
- field = new ConstFieldElementImpl.con1(fieldName);
+ field = new ConstFieldElementImpl.forNode(fieldName);
} else {
field = new FieldElementImpl.forNode(fieldName);
}
@@ -3181,7 +3181,7 @@ class ElementBuilder extends RecursiveAstVisitor<Object> {
new ConstructorElementImpl.forNode(null);
constructor.synthetic = true;
constructor.returnType = interfaceType;
- FunctionTypeImpl type = new FunctionTypeImpl.con1(constructor);
+ FunctionTypeImpl type = new FunctionTypeImpl(constructor);
_functionTypesToFix.add(type);
constructor.type = type;
return <ConstructorElement>[constructor];
@@ -3750,8 +3750,7 @@ class EnumMemberBuilder extends RecursiveAstVisitor<Object> {
indexField.type = intType;
fields.add(indexField);
getters.add(_createGetter(indexField));
- ConstFieldElementImpl valuesField =
- new ConstFieldElementImpl.con2("values", -1);
+ ConstFieldElementImpl valuesField = new ConstFieldElementImpl("values", -1);
valuesField.static = true;
valuesField.const3 = true;
valuesField.synthetic = true;
@@ -3767,7 +3766,7 @@ class EnumMemberBuilder extends RecursiveAstVisitor<Object> {
for (int i = 0; i < constantCount; i++) {
SimpleIdentifier constantName = constants[i].name;
FieldElementImpl constantField =
- new ConstFieldElementImpl.con1(constantName);
+ new ConstFieldElementImpl.forNode(constantName);
constantField.static = true;
constantField.const3 = true;
constantField.type = enumType;
@@ -3780,7 +3779,7 @@ class EnumMemberBuilder extends RecursiveAstVisitor<Object> {
DartObjectImpl value =
new DartObjectImpl(enumType, new GenericState(fieldMap));
constantValues.add(value);
- constantField.evaluationResult = new EvaluationResultImpl.con1(value);
+ constantField.evaluationResult = new EvaluationResultImpl(value);
fields.add(constantField);
getters.add(_createGetter(constantField));
constantName.staticElement = constantField;
@@ -3788,7 +3787,7 @@ class EnumMemberBuilder extends RecursiveAstVisitor<Object> {
//
// Build the value of the 'values' field.
//
- valuesField.evaluationResult = new EvaluationResultImpl.con1(
+ valuesField.evaluationResult = new EvaluationResultImpl(
new DartObjectImpl(valuesField.type, new ListState(constantValues)));
//
// Finish building the enum.
@@ -3811,7 +3810,7 @@ class EnumMemberBuilder extends RecursiveAstVisitor<Object> {
new PropertyAccessorElementImpl.forVariable(field);
getter.getter = true;
getter.returnType = field.type;
- getter.type = new FunctionTypeImpl.con1(getter);
+ getter.type = new FunctionTypeImpl(getter);
field.getter = getter;
return getter;
}
@@ -5212,7 +5211,7 @@ class ImplicitConstructorBuilder extends SimpleElementVisitor {
}
implicitConstructor.parameters = implicitParameters;
}
- FunctionTypeImpl type = new FunctionTypeImpl.con1(implicitConstructor);
+ FunctionTypeImpl type = new FunctionTypeImpl(implicitConstructor);
type.typeArguments = classType.typeArguments;
implicitConstructor.type = type;
return implicitConstructor;
@@ -5295,7 +5294,7 @@ class ImplicitConstructorBuilder extends SimpleElementVisitor {
if (_findForwardedConstructors(classElement, superType, callback) &&
!constructorFound) {
SourceRange withRange = classElement.withClauseRange;
- errorListener.onError(new AnalysisError.con2(classElement.source,
+ errorListener.onError(new AnalysisError(classElement.source,
withRange.offset, withRange.length,
CompileTimeErrorCode.MIXIN_HAS_NO_CONSTRUCTORS,
[superElement.name]));
@@ -5970,7 +5969,7 @@ class InheritanceManager {
if (!visitedClasses.contains(superclassElt)) {
visitedClasses.add(superclassElt);
try {
- resultMap = new MemberMap.con2(
+ resultMap = new MemberMap.from(
_computeClassChainLookupMap(superclassElt, visitedClasses));
//
// Substitute the super types down the hierarchy.
@@ -6003,7 +6002,7 @@ class InheritanceManager {
if (!visitedClasses.contains(mixinElement)) {
visitedClasses.add(mixinElement);
try {
- MemberMap map = new MemberMap.con2(
+ MemberMap map = new MemberMap.from(
_computeClassChainLookupMap(mixinElement, visitedClasses));
//
// Substitute the super types down the hierarchy.
@@ -6171,7 +6170,7 @@ class InheritanceManager {
//
MemberMap map =
_computeInterfaceLookupMap(superclassElement, visitedInterfaces);
- map = new MemberMap.con2(map);
+ map = new MemberMap.from(map);
//
// Substitute the super type down the hierarchy.
//
@@ -6203,7 +6202,7 @@ class InheritanceManager {
//
MemberMap map =
_computeInterfaceLookupMap(mixinElement, visitedInterfaces);
- map = new MemberMap.con2(map);
+ map = new MemberMap.from(map);
//
// Substitute the mixin type down the hierarchy.
//
@@ -6235,7 +6234,7 @@ class InheritanceManager {
//
MemberMap map =
_computeInterfaceLookupMap(interfaceElement, visitedInterfaces);
- map = new MemberMap.con2(map);
+ map = new MemberMap.from(map);
//
// Substitute the supertypes down the hierarchy
//
@@ -6336,7 +6335,7 @@ class InheritanceManager {
errorSet = new HashSet<AnalysisError>();
_errorsInClassElement[classElt] = errorSet;
}
- errorSet.add(new AnalysisError.con2(
+ errorSet.add(new AnalysisError(
classElt.source, offset, length, errorCode, arguments));
}
@@ -6682,7 +6681,7 @@ class InheritanceManager {
}
executable.returnType = dynamicType;
executable.parameters = parameters;
- FunctionTypeImpl methodType = new FunctionTypeImpl.con1(executable);
+ FunctionTypeImpl methodType = new FunctionTypeImpl(executable);
executable.type = methodType;
return executable;
}
@@ -7095,15 +7094,14 @@ class Library {
Source source =
_analysisContext.sourceFactory.resolveUri(librarySource, uriContent);
if (!_analysisContext.exists(source)) {
- _errorListener.onError(new AnalysisError.con2(librarySource,
+ _errorListener.onError(new AnalysisError(librarySource,
uriLiteral.offset, uriLiteral.length,
CompileTimeErrorCode.URI_DOES_NOT_EXIST, [uriContent]));
}
return source;
} on URISyntaxException {
- _errorListener.onError(new AnalysisError.con2(librarySource,
- uriLiteral.offset, uriLiteral.length,
- CompileTimeErrorCode.INVALID_URI, [uriContent]));
+ _errorListener.onError(new AnalysisError(librarySource, uriLiteral.offset,
+ uriLiteral.length, CompileTimeErrorCode.INVALID_URI, [uriContent]));
}
return null;
}
@@ -7202,7 +7200,7 @@ class LibraryElementBuilder {
String partLibraryName =
_getPartLibraryName(partSource, partUnit, directivesToResolve);
if (partLibraryName == null) {
- _errorListener.onError(new AnalysisError.con2(librarySource,
+ _errorListener.onError(new AnalysisError(librarySource,
partUri.offset, partUri.length,
CompileTimeErrorCode.PART_OF_NON_PART, [partUri.toSource()]));
} else if (libraryNameNode == null) {
@@ -7211,7 +7209,7 @@ class LibraryElementBuilder {
// inferred name of the library and present it in a quick-fix.
// partLibraryNames.add(partLibraryName);
} else if (libraryNameNode.name != partLibraryName) {
- _errorListener.onError(new AnalysisError.con2(librarySource,
+ _errorListener.onError(new AnalysisError(librarySource,
partUri.offset, partUri.length,
StaticWarningCode.PART_OF_DIFFERENT_LIBRARY, [
libraryNameNode.name,
@@ -7227,7 +7225,7 @@ class LibraryElementBuilder {
}
}
if (hasPartDirective && libraryNameNode == null) {
- _errorListener.onError(new AnalysisError.con1(librarySource,
+ _errorListener.onError(new AnalysisError(librarySource, 0, 0,
ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART));
}
//
@@ -7305,7 +7303,7 @@ class LibraryElementBuilder {
String partLibraryName =
_getPartLibraryName(partSource, partUnit, directivesToResolve);
if (partLibraryName == null) {
- _errorListener.onError(new AnalysisError.con2(librarySource,
+ _errorListener.onError(new AnalysisError(librarySource,
partUri.offset, partUri.length,
CompileTimeErrorCode.PART_OF_NON_PART, [partUri.toSource()]));
} else if (libraryNameNode == null) {
@@ -7314,7 +7312,7 @@ class LibraryElementBuilder {
// inferred name of the library and present it in a quick-fix.
// partLibraryNames.add(partLibraryName);
} else if (libraryNameNode.name != partLibraryName) {
- _errorListener.onError(new AnalysisError.con2(librarySource,
+ _errorListener.onError(new AnalysisError(librarySource,
partUri.offset, partUri.length,
StaticWarningCode.PART_OF_DIFFERENT_LIBRARY, [
libraryNameNode.name,
@@ -7331,7 +7329,7 @@ class LibraryElementBuilder {
}
}
if (hasPartDirective && libraryNameNode == null) {
- _errorListener.onError(new AnalysisError.con1(librarySource,
+ _errorListener.onError(new AnalysisError(librarySource, 0, 0,
ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART));
}
//
@@ -7524,7 +7522,7 @@ class LibraryImportScope extends Scope {
libraryNames[i] = _getLibraryName(conflictingMembers[i]);
}
libraryNames.sort();
- errorListener.onError(new AnalysisError.con2(getSource(identifier),
+ errorListener.onError(new AnalysisError(getSource(identifier),
identifier.offset, identifier.length,
StaticWarningCode.AMBIGUOUS_IMPORT, [
foundEltName,
@@ -7626,7 +7624,7 @@ class LibraryImportScope extends Scope {
if (sdkElement != null && nonSdkElements.length > 0) {
String sdkLibName = _getLibraryName(sdkElement);
String otherLibName = _getLibraryName(nonSdkElements[0]);
- errorListener.onError(new AnalysisError.con2(getSource(identifier),
+ errorListener.onError(new AnalysisError(getSource(identifier),
identifier.offset, identifier.length,
StaticWarningCode.CONFLICTING_DART_IMPORT, [
name,
@@ -8089,9 +8087,9 @@ class LibraryResolver {
ErrorCode errorCode = (importElement.isDeferred
? StaticWarningCode.IMPORT_OF_NON_LIBRARY
: CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY);
- _errorListener.onError(new AnalysisError.con2(
- library.librarySource, uriLiteral.offset, uriLiteral.length,
- errorCode, [uriLiteral.toSource()]));
+ _errorListener.onError(new AnalysisError(library.librarySource,
+ uriLiteral.offset, uriLiteral.length, errorCode,
+ [uriLiteral.toSource()]));
}
}
}
@@ -8119,8 +8117,8 @@ class LibraryResolver {
exports.add(exportElement);
if (analysisContext.computeKindOf(exportedSource) !=
SourceKind.LIBRARY) {
- _errorListener.onError(new AnalysisError.con2(
- library.librarySource, uriLiteral.offset, uriLiteral.length,
+ _errorListener.onError(new AnalysisError(library.librarySource,
+ uriLiteral.offset, uriLiteral.length,
CompileTimeErrorCode.EXPORT_OF_NON_LIBRARY,
[uriLiteral.toSource()]));
}
@@ -8777,9 +8775,9 @@ class LibraryResolver2 {
ErrorCode errorCode = (importElement.isDeferred
? StaticWarningCode.IMPORT_OF_NON_LIBRARY
: CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY);
- _errorListener.onError(new AnalysisError.con2(
- library.librarySource, uriLiteral.offset, uriLiteral.length,
- errorCode, [uriLiteral.toSource()]));
+ _errorListener.onError(new AnalysisError(library.librarySource,
+ uriLiteral.offset, uriLiteral.length, errorCode,
+ [uriLiteral.toSource()]));
}
}
}
@@ -8810,8 +8808,8 @@ class LibraryResolver2 {
exports.add(exportElement);
if (analysisContext.computeKindOf(exportedSource) !=
SourceKind.LIBRARY) {
- _errorListener.onError(new AnalysisError.con2(
- library.librarySource, uriLiteral.offset, uriLiteral.length,
+ _errorListener.onError(new AnalysisError(library.librarySource,
+ uriLiteral.offset, uriLiteral.length,
CompileTimeErrorCode.EXPORT_OF_NON_LIBRARY,
[uriLiteral.toSource()]));
}
@@ -9136,7 +9134,7 @@ class LibraryScope extends EnclosedScope {
offset = accessor.variable.nameOffset;
}
}
- return new AnalysisError.con2(duplicate.source, offset,
+ return new AnalysisError(duplicate.source, offset,
duplicate.displayName.length,
CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER,
[existing.displayName]);
@@ -9188,8 +9186,8 @@ class LibraryScope extends EnclosedScope {
}
/**
- * This class is used to replace uses of `HashMap<String, ExecutableElement>` which are not as
- * performant as this class.
+ * This class is used to replace uses of `HashMap<String, ExecutableElement>`
+ * which are not as performant as this class.
*/
class MemberMap {
/**
@@ -9208,15 +9206,19 @@ class MemberMap {
List<ExecutableElement> _values;
/**
- * Default constructor.
+ * Initialize a newly created member map to have the given [initialCapacity].
+ * The map will grow if needed.
*/
- MemberMap() : this.con1(10);
+ MemberMap([int initialCapacity = 10]) {
+ _initArrays(initialCapacity);
+ }
/**
* This constructor takes an initial capacity of the map.
*
* @param initialCapacity the initial capacity
*/
+ @deprecated // Use new MemberMap(initialCapacity)
MemberMap.con1(int initialCapacity) {
_initArrays(initialCapacity);
}
@@ -9224,6 +9226,7 @@ class MemberMap {
/**
* Copy constructor.
*/
+ @deprecated // Use new MemberMap.from(memberMap)
MemberMap.con2(MemberMap memberMap) {
_initArrays(memberMap._size + 5);
for (int i = 0; i < memberMap._size; i++) {
@@ -9234,6 +9237,19 @@ class MemberMap {
}
/**
+ * Initialize a newly created member map to contain the same members as the
+ * given [memberMap].
+ */
+ MemberMap.from(MemberMap memberMap) {
+ _initArrays(memberMap._size + 5);
+ for (int i = 0; i < memberMap._size; i++) {
+ _keys[i] = memberMap._keys[i];
+ _values[i] = memberMap._values[i];
+ }
+ _size = memberMap._size;
+ }
+
+ /**
* The size of the map.
*
* @return the size of the map.
@@ -11853,7 +11869,7 @@ abstract class Scope {
// TODO(jwren) There are 4 error codes for duplicate, but only 1 is being
// generated.
Source source = duplicate.source;
- return new AnalysisError.con2(source, duplicate.nameOffset,
+ return new AnalysisError(source, duplicate.nameOffset,
duplicate.displayName.length, CompileTimeErrorCode.DUPLICATE_DEFINITION,
[existing.displayName]);
}
@@ -12099,7 +12115,7 @@ abstract class ScopedVisitor extends UnifyingAstVisitor<Object> {
*/
void reportErrorForNode(ErrorCode errorCode, AstNode node,
[List<Object> arguments]) {
- _errorListener.onError(new AnalysisError.con2(
+ _errorListener.onError(new AnalysisError(
source, node.offset, node.length, errorCode, arguments));
}
@@ -12114,7 +12130,7 @@ abstract class ScopedVisitor extends UnifyingAstVisitor<Object> {
void reportErrorForOffset(ErrorCode errorCode, int offset, int length,
[List<Object> arguments]) {
_errorListener.onError(
- new AnalysisError.con2(source, offset, length, errorCode, arguments));
+ new AnalysisError(source, offset, length, errorCode, arguments));
}
/**
@@ -12126,7 +12142,7 @@ abstract class ScopedVisitor extends UnifyingAstVisitor<Object> {
*/
void reportErrorForToken(ErrorCode errorCode, sc.Token token,
[List<Object> arguments]) {
- _errorListener.onError(new AnalysisError.con2(
+ _errorListener.onError(new AnalysisError(
source, token.offset, token.length, errorCode, arguments));
}
@@ -13920,7 +13936,7 @@ class TypeResolverVisitor extends ScopedVisitor {
} else {
ClassElement definingClass = element.enclosingElement as ClassElement;
element.returnType = definingClass.type;
- FunctionTypeImpl type = new FunctionTypeImpl.con1(element);
+ FunctionTypeImpl type = new FunctionTypeImpl(element);
type.typeArguments = definingClass.type.typeArguments;
element.type = type;
}
@@ -13989,7 +14005,7 @@ class TypeResolverVisitor extends ScopedVisitor {
new CaughtException(new AnalysisException(), null));
}
element.returnType = _computeReturnType(node.returnType);
- FunctionTypeImpl type = new FunctionTypeImpl.con1(element);
+ FunctionTypeImpl type = new FunctionTypeImpl(element);
ClassElement definingClass =
element.getAncestor((element) => element is ClassElement);
if (definingClass != null) {
@@ -14046,7 +14062,7 @@ class TypeResolverVisitor extends ScopedVisitor {
new CaughtException(new AnalysisException(), null));
}
element.returnType = _computeReturnType(node.returnType);
- FunctionTypeImpl type = new FunctionTypeImpl.con1(element);
+ FunctionTypeImpl type = new FunctionTypeImpl(element);
ClassElement definingClass =
element.getAncestor((element) => element is ClassElement);
if (definingClass != null) {
@@ -14402,7 +14418,7 @@ class TypeResolverVisitor extends ScopedVisitor {
PropertyAccessorElementImpl getter =
variableElement.getter as PropertyAccessorElementImpl;
getter.returnType = declaredType;
- FunctionTypeImpl getterType = new FunctionTypeImpl.con1(getter);
+ FunctionTypeImpl getterType = new FunctionTypeImpl(getter);
ClassElement definingClass =
element.getAncestor((element) => element is ClassElement);
if (definingClass != null) {
@@ -14417,7 +14433,7 @@ class TypeResolverVisitor extends ScopedVisitor {
(parameters[0] as ParameterElementImpl).type = declaredType;
}
setter.returnType = VoidTypeImpl.instance;
- FunctionTypeImpl setterType = new FunctionTypeImpl.con1(setter);
+ FunctionTypeImpl setterType = new FunctionTypeImpl(setter);
if (definingClass != null) {
setterType.typeArguments = definingClass.type.typeArguments;
}
@@ -14838,7 +14854,7 @@ class TypeResolverVisitor extends ScopedVisitor {
// compilation unit element.
aliasElement.enclosingElement =
element.getAncestor((element) => element is CompilationUnitElement);
- FunctionTypeImpl type = new FunctionTypeImpl.con2(aliasElement);
+ FunctionTypeImpl type = new FunctionTypeImpl.forTypedef(aliasElement);
ClassElement definingClass =
element.getAncestor((element) => element is ClassElement);
if (definingClass != null) {
@@ -15042,7 +15058,7 @@ class UnusedLocalElementsVerifier extends RecursiveElementVisitor {
void _reportErrorForElement(
ErrorCode errorCode, Element element, List<Object> arguments) {
if (element != null) {
- _errorListener.onError(new AnalysisError.con2(element.source,
+ _errorListener.onError(new AnalysisError(element.source,
element.nameOffset, element.displayName.length, errorCode,
arguments));
}
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | pkg/analyzer/lib/src/generated/scanner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698