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

Unified Diff: pkg/analyzer/test/generated/static_type_analyzer_test.dart

Issue 1842563003: Format everything in analyzer (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
Index: pkg/analyzer/test/generated/static_type_analyzer_test.dart
diff --git a/pkg/analyzer/test/generated/static_type_analyzer_test.dart b/pkg/analyzer/test/generated/static_type_analyzer_test.dart
index 21085bab3d22ed5e3e490b959fa76c559f4bd6aa..dd0d1729f4475d9e17997b5b9f1a111b7e90c87a 100644
--- a/pkg/analyzer/test/generated/static_type_analyzer_test.dart
+++ b/pkg/analyzer/test/generated/static_type_analyzer_test.dart
@@ -157,7 +157,7 @@ main() {
expect(type.typeFormals, isEmpty);
}
// C - m - f
- {
+ {
expectFunctionType('f);', '<U>(S, U) → void',
elementTypeParams: '[U]',
typeParams: '[S]',
@@ -226,7 +226,7 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
void test_flatten_derived() {
// class Derived<T> extends Future<T> { ... }
ClassElementImpl derivedClass =
- ElementFactory.classElement2('Derived', ['T']);
+ ElementFactory.classElement2('Derived', ['T']);
derivedClass.supertype = _typeProvider.futureType
.instantiate([derivedClass.typeParameters[0].type]);
InterfaceType intType = _typeProvider.intType;
@@ -234,7 +234,7 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
InterfaceType derivedIntType = derivedClass.type.instantiate([intType]);
// flatten(Derived) = dynamic
InterfaceType derivedDynamicType =
- derivedClass.type.instantiate([dynamicType]);
+ derivedClass.type.instantiate([dynamicType]);
expect(_flatten(derivedDynamicType), dynamicType);
// flatten(Derived<int>) = int
expect(_flatten(derivedIntType), intType);
@@ -265,19 +265,19 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
InterfaceType numType = _typeProvider.numType;
// class Derived<T> extends Future<T>
ClassElementImpl derivedClass =
- ElementFactory.classElement2('Derived', ['T']);
+ ElementFactory.classElement2('Derived', ['T']);
derivedClass.supertype = _typeProvider.futureType
.instantiate([derivedClass.typeParameters[0].type]);
InterfaceType derivedType = derivedClass.type;
// class A extends Derived<int> implements Derived<num> { ... }
ClassElementImpl classA =
- ElementFactory.classElement('A', derivedType.instantiate([intType]));
+ ElementFactory.classElement('A', derivedType.instantiate([intType]));
classA.interfaces = <InterfaceType>[
derivedType.instantiate([numType])
];
// class B extends Future<num> implements Future<int> { ... }
ClassElementImpl classB =
- ElementFactory.classElement('B', derivedType.instantiate([numType]));
+ ElementFactory.classElement('B', derivedType.instantiate([numType]));
classB.interfaces = <InterfaceType>[
derivedType.instantiate([intType])
];
@@ -294,13 +294,13 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
InterfaceType numType = _typeProvider.numType;
// class A extends Future<int> implements Future<num> { ... }
ClassElementImpl classA =
- ElementFactory.classElement('A', futureType.instantiate([intType]));
+ ElementFactory.classElement('A', futureType.instantiate([intType]));
classA.interfaces = <InterfaceType>[
futureType.instantiate([numType])
];
// class B extends Future<num> implements Future<int> { ... }
ClassElementImpl classB =
- ElementFactory.classElement('B', futureType.instantiate([numType]));
+ ElementFactory.classElement('B', futureType.instantiate([numType]));
classB.interfaces = <InterfaceType>[
futureType.instantiate([intType])
];
@@ -314,11 +314,11 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
DartType dynamicType = _typeProvider.dynamicType;
InterfaceType futureDynamicType = _typeProvider.futureDynamicType;
InterfaceType futureIntType =
- _typeProvider.futureType.instantiate([intType]);
+ _typeProvider.futureType.instantiate([intType]);
InterfaceType futureFutureDynamicType =
- _typeProvider.futureType.instantiate([futureDynamicType]);
+ _typeProvider.futureType.instantiate([futureDynamicType]);
InterfaceType futureFutureIntType =
- _typeProvider.futureType.instantiate([futureIntType]);
+ _typeProvider.futureType.instantiate([futureIntType]);
// flatten(int) = int
expect(_flatten(intType), intType);
// flatten(dynamic) = dynamic
@@ -339,13 +339,13 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
InterfaceType stringType = _typeProvider.stringType;
// class A extends Future<int> implements Future<String> { ... }
ClassElementImpl classA =
- ElementFactory.classElement('A', futureType.instantiate([intType]));
+ ElementFactory.classElement('A', futureType.instantiate([intType]));
classA.interfaces = <InterfaceType>[
futureType.instantiate([stringType])
];
// class B extends Future<String> implements Future<int> { ... }
ClassElementImpl classB =
- ElementFactory.classElement('B', futureType.instantiate([stringType]));
+ ElementFactory.classElement('B', futureType.instantiate([stringType]));
classB.interfaces = <InterfaceType>[
futureType.instantiate([intType])
];
@@ -420,11 +420,11 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
// await e, where e has type Future<Future<int>>
InterfaceType intType = _typeProvider.intType;
InterfaceType futureIntType =
- _typeProvider.futureType.instantiate(<DartType>[intType]);
+ _typeProvider.futureType.instantiate(<DartType>[intType]);
InterfaceType futureFutureIntType =
- _typeProvider.futureType.instantiate(<DartType>[futureIntType]);
+ _typeProvider.futureType.instantiate(<DartType>[futureIntType]);
Expression node =
- AstFactory.awaitExpression(_resolvedVariable(futureFutureIntType, 'e'));
+ AstFactory.awaitExpression(_resolvedVariable(futureFutureIntType, 'e'));
expect(_analyze(node), same(intType));
_listener.assertNoErrors();
}
@@ -433,9 +433,9 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
// await e, where e has type Future<int>
InterfaceType intType = _typeProvider.intType;
InterfaceType futureIntType =
- _typeProvider.futureType.instantiate(<DartType>[intType]);
+ _typeProvider.futureType.instantiate(<DartType>[intType]);
Expression node =
- AstFactory.awaitExpression(_resolvedVariable(futureIntType, 'e'));
+ AstFactory.awaitExpression(_resolvedVariable(futureIntType, 'e'));
expect(_analyze(node), same(intType));
_listener.assertNoErrors();
}
@@ -543,7 +543,7 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
ClassElementImpl classA = ElementFactory.classElement2("A");
InterfaceType typeA = classA.type;
MethodElement operator =
- ElementFactory.methodElement("*", typeA, [_typeProvider.doubleType]);
+ ElementFactory.methodElement("*", typeA, [_typeProvider.doubleType]);
classA.methods = <MethodElement>[operator];
BinaryExpression node = AstFactory.binaryExpression(
AstFactory.asExpression(
@@ -618,7 +618,7 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
BlockFunctionBody body = AstFactory.blockFunctionBody2();
body.keyword = TokenFactory.tokenFromString('async');
FunctionExpression node =
- _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
+ _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
DartType resultType = _analyze(node);
_assertFunctionType(
_typeProvider.futureDynamicType, null, null, null, resultType);
@@ -629,12 +629,12 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
// () async => e, where e has type int
InterfaceType intType = _typeProvider.intType;
InterfaceType futureIntType =
- _typeProvider.futureType.instantiate(<DartType>[intType]);
+ _typeProvider.futureType.instantiate(<DartType>[intType]);
Expression expression = _resolvedVariable(intType, 'e');
ExpressionFunctionBody body = AstFactory.expressionFunctionBody(expression);
body.keyword = TokenFactory.tokenFromString('async');
FunctionExpression node =
- _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
+ _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
DartType resultType = _analyze(node);
_assertFunctionType(futureIntType, null, null, null, resultType);
_listener.assertNoErrors();
@@ -644,12 +644,12 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
// () async => e, where e has type Future<int>
InterfaceType intType = _typeProvider.intType;
InterfaceType futureIntType =
- _typeProvider.futureType.instantiate(<DartType>[intType]);
+ _typeProvider.futureType.instantiate(<DartType>[intType]);
Expression expression = _resolvedVariable(futureIntType, 'e');
ExpressionFunctionBody body = AstFactory.expressionFunctionBody(expression);
body.keyword = TokenFactory.tokenFromString('async');
FunctionExpression node =
- _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
+ _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
DartType resultType = _analyze(node);
_assertFunctionType(futureIntType, null, null, null, resultType);
_listener.assertNoErrors();
@@ -659,14 +659,14 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
// () async => e, where e has type Future<Future<int>>
InterfaceType intType = _typeProvider.intType;
InterfaceType futureIntType =
- _typeProvider.futureType.instantiate(<DartType>[intType]);
+ _typeProvider.futureType.instantiate(<DartType>[intType]);
InterfaceType futureFutureIntType =
- _typeProvider.futureType.instantiate(<DartType>[futureIntType]);
+ _typeProvider.futureType.instantiate(<DartType>[futureIntType]);
Expression expression = _resolvedVariable(futureFutureIntType, 'e');
ExpressionFunctionBody body = AstFactory.expressionFunctionBody(expression);
body.keyword = TokenFactory.tokenFromString('async');
FunctionExpression node =
- _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
+ _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
DartType resultType = _analyze(node);
_assertFunctionType(futureIntType, null, null, null, resultType);
_listener.assertNoErrors();
@@ -678,7 +678,7 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
body.keyword = TokenFactory.tokenFromString('async');
body.star = TokenFactory.tokenFromType(TokenType.STAR);
FunctionExpression node =
- _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
+ _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
DartType resultType = _analyze(node);
_assertFunctionType(
_typeProvider.streamDynamicType, null, null, null, resultType);
@@ -691,7 +691,7 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
body.keyword = TokenFactory.tokenFromString('sync');
body.star = TokenFactory.tokenFromType(TokenType.STAR);
FunctionExpression node =
- _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
+ _resolvedFunctionExpression(AstFactory.formalParameterList([]), body);
DartType resultType = _analyze(node);
_assertFunctionType(
_typeProvider.iterableDynamicType, null, null, null, resultType);
@@ -892,7 +892,7 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
InterfaceType listType = _typeProvider.listType;
SimpleIdentifier identifier = _resolvedVariable(listType, "a");
IndexExpression node =
- AstFactory.indexExpression(identifier, _resolvedInteger(2));
+ AstFactory.indexExpression(identifier, _resolvedInteger(2));
MethodElement indexMethod = listType.element.methods[0];
node.staticElement = indexMethod;
expect(_analyze(node), same(listType.typeArguments[0]));
@@ -905,7 +905,7 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
InterfaceType listType = _typeProvider.listType;
SimpleIdentifier identifier = _resolvedVariable(listType, "a");
IndexExpression node =
- AstFactory.indexExpression(identifier, _resolvedInteger(2));
+ AstFactory.indexExpression(identifier, _resolvedInteger(2));
MethodElement indexMethod = listType.element.methods[1];
node.staticElement = indexMethod;
AstFactory.assignmentExpression(node, TokenType.EQ, AstFactory.integer(0));
@@ -926,7 +926,7 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
identifier.staticType = listOfIntType;
// list[0] has MethodElement element (int) -> E
IndexExpression indexExpression =
- AstFactory.indexExpression(identifier, AstFactory.integer(0));
+ AstFactory.indexExpression(identifier, AstFactory.integer(0));
MethodElement indexMethod = MethodMember.from(methodElement, listOfIntType);
indexExpression.staticElement = indexMethod;
// analyze and assert result of the index expression
@@ -947,7 +947,7 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
identifier.staticType = listOfIntType;
// list[0] has MethodElement element (int) -> E
IndexExpression indexExpression =
- AstFactory.indexExpression(identifier, AstFactory.integer(0));
+ AstFactory.indexExpression(identifier, AstFactory.integer(0));
MethodElement indexMethod = MethodMember.from(methodElement, listOfIntType);
indexExpression.staticElement = indexMethod;
// list[0] should be in a setter context
@@ -963,7 +963,7 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
ClassElementImpl classElement = ElementFactory.classElement2("C");
String constructorName = "m";
ConstructorElementImpl constructor =
- ElementFactory.constructorElement2(classElement, constructorName);
+ ElementFactory.constructorElement2(classElement, constructorName);
constructor.returnType = classElement.type;
FunctionTypeImpl constructorType = new FunctionTypeImpl(constructor);
constructor.type = constructorType;
@@ -982,16 +982,16 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
ClassElementImpl elementC = ElementFactory.classElement2("C", ["E"]);
ClassElementImpl elementI = ElementFactory.classElement2("I");
ConstructorElementImpl constructor =
- ElementFactory.constructorElement2(elementC, null);
+ ElementFactory.constructorElement2(elementC, null);
elementC.constructors = <ConstructorElement>[constructor];
constructor.returnType = elementC.type;
FunctionTypeImpl constructorType = new FunctionTypeImpl(constructor);
constructor.type = constructorType;
TypeName typeName =
- AstFactory.typeName(elementC, [AstFactory.typeName(elementI)]);
+ AstFactory.typeName(elementC, [AstFactory.typeName(elementI)]);
typeName.type = elementC.type.instantiate(<DartType>[elementI.type]);
InstanceCreationExpression node =
- AstFactory.instanceCreationExpression2(null, typeName);
+ AstFactory.instanceCreationExpression2(null, typeName);
node.staticElement = constructor;
InterfaceType interfaceType = _analyze(node) as InterfaceType;
List<DartType> typeArgs = interfaceType.typeArguments;
@@ -1004,7 +1004,7 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
// new C()
ClassElementImpl classElement = ElementFactory.classElement2("C");
ConstructorElementImpl constructor =
- ElementFactory.constructorElement2(classElement, null);
+ ElementFactory.constructorElement2(classElement, null);
constructor.returnType = classElement.type;
FunctionTypeImpl constructorType = new FunctionTypeImpl(constructor);
constructor.type = constructorType;
@@ -1123,7 +1123,7 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
void test_visitPostfixExpression_plusPlus() {
// 0++
PostfixExpression node =
- AstFactory.postfixExpression(_resolvedInteger(0), TokenType.PLUS_PLUS);
+ AstFactory.postfixExpression(_resolvedInteger(0), TokenType.PLUS_PLUS);
expect(_analyze(node), same(_typeProvider.intType));
_listener.assertNoErrors();
}
@@ -1131,7 +1131,7 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
void test_visitPrefixedIdentifier_getter() {
DartType boolType = _typeProvider.boolType;
PropertyAccessorElementImpl getter =
- ElementFactory.getterElement("b", false, boolType);
+ ElementFactory.getterElement("b", false, boolType);
PrefixedIdentifier node = AstFactory.identifier5("a", "b");
node.identifier.staticElement = getter;
expect(_analyze(node), same(boolType));
@@ -1141,7 +1141,7 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
void test_visitPrefixedIdentifier_setter() {
DartType boolType = _typeProvider.boolType;
FieldElementImpl field =
- ElementFactory.fieldElement("b", false, false, false, boolType);
+ ElementFactory.fieldElement("b", false, false, false, boolType);
PropertyAccessorElement setter = field.setter;
PrefixedIdentifier node = AstFactory.identifier5("a", "b");
node.identifier.staticElement = setter;
@@ -1161,7 +1161,7 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
void test_visitPrefixExpression_bang() {
// !0
PrefixExpression node =
- AstFactory.prefixExpression(TokenType.BANG, _resolvedInteger(0));
+ AstFactory.prefixExpression(TokenType.BANG, _resolvedInteger(0));
expect(_analyze(node), same(_typeProvider.boolType));
_listener.assertNoErrors();
}
@@ -1169,7 +1169,7 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
void test_visitPrefixExpression_minus() {
// -0
PrefixExpression node =
- AstFactory.prefixExpression(TokenType.MINUS, _resolvedInteger(0));
+ AstFactory.prefixExpression(TokenType.MINUS, _resolvedInteger(0));
MethodElement minusMethod = getMethod(_typeProvider.numType, "-");
node.staticElement = minusMethod;
expect(_analyze(node), same(_typeProvider.numType));
@@ -1179,7 +1179,7 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
void test_visitPrefixExpression_minusMinus() {
// --0
PrefixExpression node =
- AstFactory.prefixExpression(TokenType.MINUS_MINUS, _resolvedInteger(0));
+ AstFactory.prefixExpression(TokenType.MINUS_MINUS, _resolvedInteger(0));
MethodElement minusMethod = getMethod(_typeProvider.numType, "-");
node.staticElement = minusMethod;
expect(_analyze(node), same(_typeProvider.intType));
@@ -1197,7 +1197,7 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
void test_visitPrefixExpression_plusPlus() {
// ++0
PrefixExpression node =
- AstFactory.prefixExpression(TokenType.PLUS_PLUS, _resolvedInteger(0));
+ AstFactory.prefixExpression(TokenType.PLUS_PLUS, _resolvedInteger(0));
MethodElement plusMethod = getMethod(_typeProvider.numType, "+");
node.staticElement = plusMethod;
expect(_analyze(node), same(_typeProvider.intType));
@@ -1207,7 +1207,7 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
void test_visitPrefixExpression_tilde() {
// ~0
PrefixExpression node =
- AstFactory.prefixExpression(TokenType.TILDE, _resolvedInteger(0));
+ AstFactory.prefixExpression(TokenType.TILDE, _resolvedInteger(0));
MethodElement tildeMethod = getMethod(_typeProvider.intType, "~");
node.staticElement = tildeMethod;
expect(_analyze(node), same(_typeProvider.intType));
@@ -1217,9 +1217,9 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
void test_visitPropertyAccess_propagated_getter() {
DartType boolType = _typeProvider.boolType;
PropertyAccessorElementImpl getter =
- ElementFactory.getterElement("b", false, boolType);
+ ElementFactory.getterElement("b", false, boolType);
PropertyAccess node =
- AstFactory.propertyAccess2(AstFactory.identifier3("a"), "b");
+ AstFactory.propertyAccess2(AstFactory.identifier3("a"), "b");
node.propertyName.propagatedElement = getter;
expect(_analyze2(node, false), same(boolType));
_listener.assertNoErrors();
@@ -1228,10 +1228,10 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
void test_visitPropertyAccess_propagated_setter() {
DartType boolType = _typeProvider.boolType;
FieldElementImpl field =
- ElementFactory.fieldElement("b", false, false, false, boolType);
+ ElementFactory.fieldElement("b", false, false, false, boolType);
PropertyAccessorElement setter = field.setter;
PropertyAccess node =
- AstFactory.propertyAccess2(AstFactory.identifier3("a"), "b");
+ AstFactory.propertyAccess2(AstFactory.identifier3("a"), "b");
node.propertyName.propagatedElement = setter;
expect(_analyze2(node, false), same(boolType));
_listener.assertNoErrors();
@@ -1240,9 +1240,9 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
void test_visitPropertyAccess_static_getter() {
DartType boolType = _typeProvider.boolType;
PropertyAccessorElementImpl getter =
- ElementFactory.getterElement("b", false, boolType);
+ ElementFactory.getterElement("b", false, boolType);
PropertyAccess node =
- AstFactory.propertyAccess2(AstFactory.identifier3("a"), "b");
+ AstFactory.propertyAccess2(AstFactory.identifier3("a"), "b");
node.propertyName.staticElement = getter;
expect(_analyze(node), same(boolType));
_listener.assertNoErrors();
@@ -1251,10 +1251,10 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
void test_visitPropertyAccess_static_setter() {
DartType boolType = _typeProvider.boolType;
FieldElementImpl field =
- ElementFactory.fieldElement("b", false, false, false, boolType);
+ ElementFactory.fieldElement("b", false, false, false, boolType);
PropertyAccessorElement setter = field.setter;
PropertyAccess node =
- AstFactory.propertyAccess2(AstFactory.identifier3("a"), "b");
+ AstFactory.propertyAccess2(AstFactory.identifier3("a"), "b");
node.propertyName.staticElement = setter;
expect(_analyze(node), same(boolType));
_listener.assertNoErrors();
@@ -1477,13 +1477,13 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
StaticTypeAnalyzer _createAnalyzer() {
InternalAnalysisContext context = AnalysisContextFactory.contextWithCore();
FileBasedSource source =
- new FileBasedSource(FileUtilities2.createFile("/lib.dart"));
+ new FileBasedSource(FileUtilities2.createFile("/lib.dart"));
CompilationUnitElementImpl definingCompilationUnit =
- new CompilationUnitElementImpl("lib.dart");
+ new CompilationUnitElementImpl("lib.dart");
definingCompilationUnit.librarySource =
definingCompilationUnit.source = source;
LibraryElementImpl definingLibrary =
- new LibraryElementImpl.forNode(context, null);
+ new LibraryElementImpl.forNode(context, null);
definingLibrary.definingCompilationUnit = definingCompilationUnit;
_typeProvider = new TestTypeProvider(context);
_visitor = new ResolverVisitor(
@@ -1511,7 +1511,7 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
InterfaceType type, String variableName) {
SimpleIdentifier identifier = AstFactory.identifier3(variableName);
VariableElementImpl element =
- ElementFactory.localVariableElement(identifier);
+ ElementFactory.localVariableElement(identifier);
element.type = type;
identifier.staticType = _typeProvider.dynamicType;
identifier.propagatedElement = element;
@@ -1546,7 +1546,7 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
List<ParameterElement> parameterElements = new List<ParameterElement>();
for (FormalParameter parameter in parameters.parameters) {
ParameterElementImpl element =
- new ParameterElementImpl.forNode(parameter.identifier);
+ new ParameterElementImpl.forNode(parameter.identifier);
element.parameterKind = parameter.kind;
element.type = _typeProvider.dynamicType;
parameter.identifier.staticElement = element;
@@ -1594,7 +1594,7 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
SimpleIdentifier _resolvedVariable(InterfaceType type, String variableName) {
SimpleIdentifier identifier = AstFactory.identifier3(variableName);
VariableElementImpl element =
- ElementFactory.localVariableElement(identifier);
+ ElementFactory.localVariableElement(identifier);
element.type = type;
identifier.staticElement = element;
identifier.staticType = type;
« no previous file with comments | « pkg/analyzer/test/generated/simple_resolver_test.dart ('k') | pkg/analyzer/test/generated/static_type_warning_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698