aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/typestring.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/types2/typestring.go')
-rw-r--r--src/cmd/compile/internal/types2/typestring.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/compile/internal/types2/typestring.go b/src/cmd/compile/internal/types2/typestring.go
index 628eeaf3dd..b3675424a5 100644
--- a/src/cmd/compile/internal/types2/typestring.go
+++ b/src/cmd/compile/internal/types2/typestring.go
@@ -130,7 +130,7 @@ func writeType(buf *bytes.Buffer, typ Type, qf Qualifier, visited []Type) {
// Unions only appear as (syntactic) embedded elements
// in interfaces and syntactically cannot be empty.
if t.NumTerms() == 0 {
- panic("internal error: empty union")
+ panic("empty union")
}
for i, t := range t.terms {
if i > 0 {
@@ -183,7 +183,7 @@ func writeType(buf *bytes.Buffer, typ Type, qf Qualifier, visited []Type) {
case RecvOnly:
s = "<-chan "
default:
- panic("unreachable")
+ unreachable()
}
buf.WriteString(s)
if parens {
@@ -329,7 +329,7 @@ func writeTuple(buf *bytes.Buffer, tup *Tuple, variadic bool, qf Qualifier, visi
// special case:
// append(s, "foo"...) leads to signature func([]byte, string...)
if t := asBasic(typ); t == nil || t.kind != String {
- panic("internal error: string type expected")
+ panic("expected string type")
}
writeType(buf, typ, qf, visited)
buf.WriteString("...")