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

Unified Diff: pkg/compiler/lib/src/kernel/kernel_visitor.dart

Issue 2647043002: Fix hints reported by analyzer. (Closed)
Patch Set: Address review comments. Created 3 years, 11 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/compiler/lib/src/kernel/kernel_visitor.dart
diff --git a/pkg/compiler/lib/src/kernel/kernel_visitor.dart b/pkg/compiler/lib/src/kernel/kernel_visitor.dart
index 831eff4240e5afda8999c4e2f35331e00b99a2a0..c44cf5b4149586e6fbd6218355d26252d6f2e928 100644
--- a/pkg/compiler/lib/src/kernel/kernel_visitor.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_visitor.dart
@@ -1032,11 +1032,8 @@ class KernelVisitor extends Object
}
ir.SwitchCase irCase = casesIterator.current;
List<ir.Statement> statements = <ir.Statement>[];
- bool hasVariableDeclaration = false;
for (Statement statement in caseNode.statements.nodes) {
- if (buildStatement(statement, statements)) {
- hasVariableDeclaration = true;
- }
+ buildStatement(statement, statements);
}
if (statements.isEmpty || fallsThrough(statements.last)) {
if (isLastCase) {
@@ -2109,7 +2106,6 @@ class KernelVisitor extends Object
// [body] must be `null`.
} else if (function.isConstructor) {
// TODO(johnniwinther): Clean this up pending kernel issue #28.
- ConstructorElement constructor = function;
if (bodyNode == null || bodyNode.asEmptyStatement() != null) {
body = new ir.EmptyStatement();
} else {
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart ('k') | pkg/compiler/lib/src/native/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698