Skip to content

Commit a3771dd

Browse files
committed
apidiff: add more clear message about missing type
Change-Id: I4dec1fc68007695a85696229a7dd061a252a4db1 Reviewed-on: https://go-review.googlesource.com/c/exp/+/410854 TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Jonathan Amsterdam <[email protected]> Run-TryBot: Jean de Klerk <[email protected]>
1 parent 4a0574d commit a3771dd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apidiff/correspondence.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package apidiff
22

33
import (
4+
"fmt"
45
"go/types"
56
"sort"
67
)
@@ -126,7 +127,7 @@ func (d *differ) corr(old, new types.Type, p *ifacePair) bool {
126127
}
127128

128129
default:
129-
panic("unknown type kind")
130+
panic(fmt.Sprintf("unknown type kind %T", old))
130131
}
131132
return false
132133
}

0 commit comments

Comments
 (0)