Index: pkg/compiler/lib/src/ssa/builder_kernel.dart |
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart |
index 223889ecc1e916ceedd510536196d5b16904cec4..25a05f7f96025c725a57888b22da2dcb224c7d4b 100644 |
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart |
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart |
@@ -25,7 +25,7 @@ import '../kernel/kernel.dart'; |
import '../native/native.dart' as native; |
import '../resolution/tree_elements.dart'; |
import '../tree/dartstring.dart'; |
-import '../tree/nodes.dart' show Node, BreakStatement; |
+import '../tree/nodes.dart' show Node; |
import '../types/masks.dart'; |
import '../universe/call_structure.dart' show CallStructure; |
import '../universe/selector.dart'; |
@@ -597,7 +597,6 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder { |
returnStatement.expression.accept(this); |
value = pop(); |
if (_targetFunction.asyncMarker == ir.AsyncMarker.Async) { |
- var returnType = astAdapter.getDartType(_targetFunction.returnType); |
if (compiler.options.enableTypeAssertions && |
!isValidAsyncReturnType(_targetFunction.returnType)) { |
generateTypeError( |
@@ -1244,14 +1243,10 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder { |
bool hasContinue = false; |
Map<ir.SwitchCase, int> caseIndex = new Map<ir.SwitchCase, int>(); |
int switchIndex = 1; |
- bool hasDefault = false; |
for (ir.SwitchCase switchCase in switchStatement.cases) { |
if (SwitchContinueAnalysis.containsContinue(switchCase.body)) { |
hasContinue = true; |
} |
- if (switchCase.isDefault) { |
- hasDefault = true; |
- } |
caseIndex[switchCase] = switchIndex; |
switchIndex++; |
} |