Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit 06d1398

Browse files
owen-mcsmowton
authored andcommitted
Fix panic when type is unknown
1 parent 2e8b9a9 commit 06d1398

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

extractor/extractor.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1815,6 +1815,9 @@ func extractNumLines(tw *trap.Writer, fileName string, ast *ast.File) {
18151815
// of an interface must be a method signature, an embedded interface type or a
18161816
// type set literal.
18171817
func isNonUnionTypeSetLiteral(t types.Type) bool {
1818+
if t == nil {
1819+
return false
1820+
}
18181821
switch t.Underlying().(type) {
18191822
case *types.Interface, *types.Union, *types.Signature:
18201823
return false

0 commit comments

Comments
 (0)