diff options
Diffstat (limited to 'src/cmd/compile/internal/types2/typestring.go')
-rw-r--r-- | src/cmd/compile/internal/types2/typestring.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/types2/typestring.go b/src/cmd/compile/internal/types2/typestring.go index ead17ba2f3..cb7cf73a62 100644 --- a/src/cmd/compile/internal/types2/typestring.go +++ b/src/cmd/compile/internal/types2/typestring.go @@ -129,7 +129,7 @@ func writeType(buf *bytes.Buffer, typ Type, qf Qualifier, visited []Type) { case *Union: // Unions only appear as (syntactic) embedded elements // in interfaces and syntactically cannot be empty. - if t.NumTerms() == 0 { + if t.Len() == 0 { panic("empty union") } for i, t := range t.terms { |