(typ super.Type)
| 960 | } |
| 961 | |
| 962 | func (c *checker) hasArray(typ super.Type) (super.Type, bool) { |
| 963 | switch typ := super.TypeUnder(typ).(type) { |
| 964 | case *super.TypeUnion: |
| 965 | for _, t := range typ.Types { |
| 966 | if elemType, ok := c.hasArray(t); ok { |
| 967 | return elemType, true |
| 968 | } |
| 969 | } |
| 970 | case *super.TypeArray: |
| 971 | return typ.Type, true |
| 972 | } |
| 973 | if isUnknown(typ) { |
| 974 | return c.unknown, true |
| 975 | } |
| 976 | return nil, false |
| 977 | |
| 978 | } |
| 979 | |
| 980 | func (c *checker) indexOf(cloc, iloc ast.Node, container, index super.Type) (super.Type, bool) { |
| 981 | if hasUnknown(container) { |
no test coverage detected