src/com/google/javascript/rhino/jstype/UnionType.java
/**
   * Use UnionTypeBuilder to rebuild the list of alternatesCollapsingStructuralSubtypes and hashcode
   * of the current UnionType.
   */
Use UnionTypeBuilder to rebuild the list of alternatesCollapsingStructuralSubtypes and hashcode
of the current UnionType.
Use UnionTypeBuilder to rebuild the list of alternatesCollapsingStructuralSubtypes and hashcode of the current UnionType .
private void rebuildAlternates() {
    UnionTypeBuilder nonCollapsingBuilder = UnionTypeBuilder.create(registry);
    UnionTypeBuilder collapsingBuilder =
        UnionTypeBuilder.createForCollapsingStructuralSubtypes(registry);
    for (JSType alternate : alternatesRetainingStructuralSubtypes) {
      nonCollapsingBuilder.addAlternate(alternate);
      collapsingBuilder.addAlternate(alternate);
    }
    alternatesRetainingStructuralSubtypes = nonCollapsingBuilder.getAlternates();
    alternatesCollapsingStructuralSubtypes = collapsingBuilder.getAlternates();
  }
private void rebuildAlternates ( ) { UnionTypeBuilder nonCollapsingBuilder = UnionTypeBuilder . create ( registry ) ; UnionTypeBuilder collapsingBuilder = UnionTypeBuilder . createForCollapsingStructuralSubtypes ( registry ) ; for ( JSType alternate : alternatesRetainingStructuralSubtypes ) { nonCollapsingBuilder . addAlternate ( alternate ) ; collapsingBuilder . addAlternate ( alternate ) ; } alternatesRetainingStructuralSubtypes = nonCollapsingBuilder . getAlternates ( ) ; alternatesCollapsingStructuralSubtypes = collapsingBuilder . getAlternates ( ) ; }
Use UnionTypeBuilder to rebuild the list of alternatesCollapsingStructuralSubtypes and hashcode
 of the current UnionType.
Use UnionTypeBuilder to rebuild the list of alternatesCollapsingStructuralSubtypes and hashcode of the current UnionType .