| Index: pkg/compiler/lib/src/types/container_type_mask.dart
|
| diff --git a/pkg/compiler/lib/src/types/container_type_mask.dart b/pkg/compiler/lib/src/types/container_type_mask.dart
|
| index c38a03ab5bc8bf2920f7c27c6d0e6810279f6215..6a6ad806bb987ab509da5fba925e1db8f0a55f3e 100644
|
| --- a/pkg/compiler/lib/src/types/container_type_mask.dart
|
| +++ b/pkg/compiler/lib/src/types/container_type_mask.dart
|
| @@ -22,29 +22,20 @@ class ContainerTypeMask extends ForwardingTypeMask {
|
| // The length of the container.
|
| final int length;
|
|
|
| - ContainerTypeMask(this.forwardTo,
|
| - this.allocationNode,
|
| - this.allocationElement,
|
| - this.elementType,
|
| - this.length);
|
| + ContainerTypeMask(this.forwardTo, this.allocationNode, this.allocationElement,
|
| + this.elementType, this.length);
|
|
|
| TypeMask nullable() {
|
| return isNullable
|
| ? this
|
| - : new ContainerTypeMask(forwardTo.nullable(),
|
| - allocationNode,
|
| - allocationElement,
|
| - elementType,
|
| - length);
|
| + : new ContainerTypeMask(forwardTo.nullable(), allocationNode,
|
| + allocationElement, elementType, length);
|
| }
|
|
|
| TypeMask nonNullable() {
|
| return isNullable
|
| - ? new ContainerTypeMask(forwardTo.nonNullable(),
|
| - allocationNode,
|
| - allocationElement,
|
| - elementType,
|
| - length)
|
| + ? new ContainerTypeMask(forwardTo.nonNullable(), allocationNode,
|
| + allocationElement, elementType, length)
|
| : this;
|
| }
|
|
|
| @@ -62,9 +53,7 @@ class ContainerTypeMask extends ForwardingTypeMask {
|
| TypeMask intersection(TypeMask other, ClassWorld classWorld) {
|
| TypeMask forwardIntersection = forwardTo.intersection(other, classWorld);
|
| if (forwardIntersection.isEmptyOrNull) return forwardIntersection;
|
| - return forwardIntersection.isNullable
|
| - ? nullable()
|
| - : nonNullable();
|
| + return forwardIntersection.isNullable ? nullable() : nonNullable();
|
| }
|
|
|
| TypeMask union(other, ClassWorld classWorld) {
|
| @@ -74,9 +63,9 @@ class ContainerTypeMask extends ForwardingTypeMask {
|
| return other.isNullable ? other : this;
|
| } else if (other.isEmptyOrNull) {
|
| return other.isNullable ? this.nullable() : this;
|
| - } else if (other.isContainer
|
| - && elementType != null
|
| - && other.elementType != null) {
|
| + } else if (other.isContainer &&
|
| + elementType != null &&
|
| + other.elementType != null) {
|
| TypeMask newElementType =
|
| elementType.union(other.elementType, classWorld);
|
| int newLength = (length == other.length) ? length : null;
|
| @@ -84,15 +73,17 @@ class ContainerTypeMask extends ForwardingTypeMask {
|
| return new ContainerTypeMask(
|
| newForwardTo,
|
| allocationNode == other.allocationNode ? allocationNode : null,
|
| - allocationElement == other.allocationElement ? allocationElement
|
| - : null,
|
| - newElementType, newLength);
|
| + allocationElement == other.allocationElement
|
| + ? allocationElement
|
| + : null,
|
| + newElementType,
|
| + newLength);
|
| } else {
|
| return forwardTo.union(other, classWorld);
|
| }
|
| }
|
|
|
| - bool operator==(other) => super == other;
|
| + bool operator ==(other) => super == other;
|
|
|
| int get hashCode {
|
| return computeHashCode(
|
|
|