MCPcopy Create free account
hub / github.com/brimdata/super / hasArray

Method hasArray

compiler/semantic/checker.go:962–978  ·  view source on GitHub ↗
(typ super.Type)

Source from the content-addressed store, hash-verified

960}
961
962func (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
980func (c *checker) indexOf(cloc, iloc ast.Node, container, index super.Type) (super.Type, bool) {
981 if hasUnknown(container) {

Callers 2

unnestCheckMethod · 0.95
semMapCallMethod · 0.80

Calls 2

TypeUnderFunction · 0.92
isUnknownFunction · 0.85

Tested by

no test coverage detected