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

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

Issue 11412245: MalformedType used for all invalid type annotations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Bug fixes Created 8 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
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 995ac5be3f9c1bd8624359f155513e0b04e98eb3..036d1ac4b4de5a5b01413c5e9f163ad103e1e833 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
@@ -571,7 +571,9 @@ class SsaConstantFolder extends HBaseVisitor implements OptimizationPhase {
&& !RuntimeTypeInformation.hasTypeArguments(type)) {
DartType receiverType = expressionType.computeType(compiler);
if (receiverType != null) {
- if (compiler.types.isSubtype(receiverType, type)) {
+ if (!receiverType.isMalformed &&
+ !type.isMalformed &&
+ compiler.types.isSubtype(receiverType, type)) {
return graph.addConstantBool(true, constantSystem);
} else if (expressionType.isExact()) {
return graph.addConstantBool(false, constantSystem);

Powered by Google App Engine
This is Rietveld 408576698