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

Side by Side Diff: pkg/compiler/lib/src/resolution/send_resolver.dart

Issue 2791993002: Fix dart2js warnings and add test to ensure it stays clean. (Closed)
Patch Set: Remove unused method. Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.semantics_visitor.resolver; 5 library dart2js.semantics_visitor.resolver;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../constants/expressions.dart'; 8 import '../constants/expressions.dart';
9 import '../elements/resolution_types.dart'; 9 import '../elements/resolution_types.dart';
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 INSTANCE_METHOD, 87 INSTANCE_METHOD,
88 LOCAL_FUNCTION, 88 LOCAL_FUNCTION,
89 CLOSURE, 89 CLOSURE,
90 } 90 }
91 91
92 class FunctionDeclStructure<R, A> extends DeclStructure<R, A> { 92 class FunctionDeclStructure<R, A> extends DeclStructure<R, A> {
93 final FunctionKind kind; 93 final FunctionKind kind;
94 94
95 FunctionDeclStructure(this.kind, FunctionElement function) : super(function); 95 FunctionDeclStructure(this.kind, FunctionElement function) : super(function);
96 96
97 // ignore: MISSING_RETURN
97 R dispatch(SemanticDeclarationVisitor<R, A> visitor, FunctionExpression node, 98 R dispatch(SemanticDeclarationVisitor<R, A> visitor, FunctionExpression node,
98 A arg) { 99 A arg) {
99 switch (kind) { 100 switch (kind) {
100 case FunctionKind.TOP_LEVEL_GETTER: 101 case FunctionKind.TOP_LEVEL_GETTER:
101 return visitor.visitTopLevelGetterDeclaration( 102 return visitor.visitTopLevelGetterDeclaration(
102 node, element, node.body, arg); 103 node, element, node.body, arg);
103 case FunctionKind.TOP_LEVEL_SETTER: 104 case FunctionKind.TOP_LEVEL_SETTER:
104 return visitor.visitTopLevelSetterDeclaration( 105 return visitor.visitTopLevelSetterDeclaration(
105 node, element, node.parameters, node.body, arg); 106 node, element, node.parameters, node.body, arg);
106 case FunctionKind.TOP_LEVEL_FUNCTION: 107 case FunctionKind.TOP_LEVEL_FUNCTION:
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 return internalError(node, "Unexpected variable $element."); 329 return internalError(node, "Unexpected variable $element.");
329 } 330 }
330 if (element.isConst) { 331 if (element.isConst) {
331 ConstantExpression constant = elements.getConstant(element.initializer); 332 ConstantExpression constant = elements.getConstant(element.initializer);
332 return new ConstantVariableStructure(kind, node, element, constant); 333 return new ConstantVariableStructure(kind, node, element, constant);
333 } else { 334 } else {
334 return new NonConstantVariableStructure(kind, node, element); 335 return new NonConstantVariableStructure(kind, node, element);
335 } 336 }
336 } 337 }
337 } 338 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698