| Index: lib/compiler/implementation/ssa/types.dart
|
| diff --git a/lib/compiler/implementation/ssa/types.dart b/lib/compiler/implementation/ssa/types.dart
|
| index cac3924513ff5ad512b29ba7263a64d719cb9c52..b3fa03d48ddcdab6421071aa4baa950a78adcb7e 100644
|
| --- a/lib/compiler/implementation/ssa/types.dart
|
| +++ b/lib/compiler/implementation/ssa/types.dart
|
| @@ -199,7 +199,7 @@ class HBooleanOrNullType extends HPrimitiveOrNullType {
|
| if (other.isUnknown()) return HType.BOOLEAN_OR_NULL;
|
| if (other.isBooleanOrNull()) return HType.BOOLEAN_OR_NULL;
|
| if (other.isBoolean()) return HType.BOOLEAN;
|
| - if (other.isNull()) return HType.NULL;
|
| + if (other.canBeNull()) return HType.NULL;
|
| return HType.CONFLICTING;
|
| }
|
| }
|
| @@ -254,7 +254,7 @@ class HNumberOrNullType extends HPrimitiveOrNullType {
|
| if (other.isIntegerOrNull()) return HType.INTEGER_OR_NULL;
|
| if (other.isDoubleOrNull()) return HType.DOUBLE_OR_NULL;
|
| if (other.isNumberOrNull()) return HType.NUMBER_OR_NULL;
|
| - if (other.isNull()) return HType.NULL;
|
| + if (other.canBeNull()) return HType.NULL;
|
| return HType.CONFLICTING;
|
| }
|
| }
|
| @@ -313,7 +313,7 @@ class HIntegerOrNullType extends HNumberOrNullType {
|
| if (other.isDoubleOrNull()) return HType.CONFLICTING;
|
| if (other.isNumber()) return HType.INTEGER;
|
| if (other.isNumberOrNull()) return HType.INTEGER_OR_NULL;
|
| - if (other.isNull()) return HType.NULL;
|
| + if (other.canBeNull()) return HType.NULL;
|
| return HType.CONFLICTING;
|
| }
|
| }
|
| @@ -376,7 +376,7 @@ class HDoubleOrNullType extends HNumberOrNullType {
|
| if (other.isDoubleOrNull()) return HType.DOUBLE_OR_NULL;
|
| if (other.isNumber()) return HType.DOUBLE;
|
| if (other.isNumberOrNull()) return HType.DOUBLE_OR_NULL;
|
| - if (other.isNull()) return HType.NULL;
|
| + if (other.canBeNull()) return HType.NULL;
|
| return HType.CONFLICTING;
|
| }
|
| }
|
| @@ -484,7 +484,7 @@ class HStringOrNullType extends HPrimitiveOrNullType {
|
| if (other is HBoundedPotentialPrimitiveString) {
|
| return other.canBeNull() ? HType.STRING_OR_NULL : HType.STRING;
|
| }
|
| - if (other.isNull()) return HType.NULL;
|
| + if (other.canBeNull()) return HType.NULL;
|
| return HType.CONFLICTING;
|
| }
|
| }
|
| @@ -631,18 +631,17 @@ class HBoundedType extends HType {
|
| if (this.type === temp.type) {
|
| if (isExact()) {
|
| return this;
|
| - } else if (other.isExact()){
|
| + } else if (other.isExact()) {
|
| return other;
|
| } else if (canBeNull()) {
|
| return other;
|
| } else {
|
| return this;
|
| }
|
| - } else if (canBeNull() && other.canBeNull()) {
|
| - return HType.NULL;
|
| }
|
| }
|
| if (other.isUnknown()) return this;
|
| + if (other.canBeNull() && canBeNull()) return HType.NULL;
|
| return HType.CONFLICTING;
|
| }
|
|
|
|
|