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

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

Issue 54983007: Make test of malformed types a dynamic type error. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 years, 1 month 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 | « sdk/lib/_internal/compiler/implementation/ssa/nodes.dart ('k') | sdk/lib/_internal/lib/js_helper.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/optimize.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
index 6b83cda776b8c356337cd743c3baa964dedede71..d947b91e37b65186375006bf96ad2f65c23e9ff2 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
@@ -594,6 +594,11 @@ class SsaInstructionSimplifier extends HBaseVisitor
HInstruction value = node.inputs[0];
DartType type = node.typeExpression;
if (type != null) {
+ if (type.kind == TypeKind.MALFORMED_TYPE) {
+ // Malformed types are treated as dynamic statically, but should
+ // throw a type error at runtime.
+ return node;
+ }
if (!type.treatAsRaw || type.kind == TypeKind.TYPE_VARIABLE) {
return node;
}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/nodes.dart ('k') | sdk/lib/_internal/lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698