aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/predicates.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/types2/predicates.go')
-rw-r--r--src/cmd/compile/internal/types2/predicates.go12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/cmd/compile/internal/types2/predicates.go b/src/cmd/compile/internal/types2/predicates.go
index bb7fedda3b..afef488b96 100644
--- a/src/cmd/compile/internal/types2/predicates.go
+++ b/src/cmd/compile/internal/types2/predicates.go
@@ -229,16 +229,6 @@ func identical(x, y Type, cmpTags bool, p *ifacePair) bool {
identical(x.results, y.results, cmpTags, p)
}
- case *Union:
- // Two union types are identical if they contain the same terms.
- // The set (list) of types in a union type consists of unique
- // types - each type appears exactly once. Thus, two union types
- // must contain the same number of types to have chance of
- // being equal.
- if y, ok := y.(*Union); ok {
- return identicalTerms(x.terms, y.terms)
- }
-
case *Interface:
// Two interface types are identical if they describe the same type sets.
// With the existing implementation restriction, this simplifies to:
@@ -250,7 +240,7 @@ func identical(x, y Type, cmpTags bool, p *ifacePair) bool {
if y, ok := y.(*Interface); ok {
xset := x.typeSet()
yset := y.typeSet()
- if !Identical(xset.types, yset.types) {
+ if !xset.terms.equal(yset.terms) {
return false
}
a := xset.methods