Skip to content

Commit

Permalink
Make a note about derived types
Browse files Browse the repository at this point in the history
  • Loading branch information
chriso committed Nov 23, 2023
1 parent 94cf9ee commit db5da01
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion types/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ type Type struct {
index int
}

// Index is the index of the type in the serialized state.
// Index is the index of the type in the serialized state, or -1
// if the type is derived from a serialized type.
func (t *Type) Index() int {
return t.index
}
Expand Down Expand Up @@ -960,6 +961,7 @@ func (s *Scanner) readType() (ok bool) {
return false
}
t := s.state.Type(int(id - 1))

len, ok := s.getVarint()
if !ok {
return false
Expand Down

0 comments on commit db5da01

Please sign in to comment.