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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/builder.dart

Issue 21292003: Handle int/double case expression types correctly. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments Created 7 years, 4 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 | « no previous file | sdk/lib/_internal/compiler/implementation/typechecker.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/ssa/builder.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
index 12be2f687abdea5f1bd82487b3ae575be137cba5..72665295e4841351759b8e604360f1866d0fffbd 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
@@ -4432,15 +4432,6 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
MessageKind.SWITCH_CASE_VALUE_OVERRIDES_EQUALS);
failure = true;
}
- } else {
- DartType constantType =
- constant.computeType(compiler);
- if (constantType != firstConstantType) {
- compiler.reportFatalError(
- match.expression,
- MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL);
- failure = true;
- }
}
constants[labelOrCase] = constant;
}
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/typechecker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698