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

Function hasString

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

Source from the content-addressed store, hash-verified

930}
931
932func hasString(typ super.Type) bool {
933 switch typ := super.TypeUnder(typ).(type) {
934 case *super.TypeError:
935 return isUnknown(typ)
936 case *super.TypeOfString, *super.TypeOfNull:
937 return true
938 case *super.TypeUnion:
939 return slices.ContainsFunc(typ.Types, hasString)
940 }
941 return false
942}
943
944func isUnknown(typ super.Type) bool {
945 if err, ok := super.TypeUnder(typ).(*super.TypeError); ok {

Callers 4

exprMethod · 0.85
regexpMethod · 0.85
stringyMethod · 0.85
exprMethod · 0.85

Calls 2

TypeUnderFunction · 0.92
isUnknownFunction · 0.85

Tested by

no test coverage detected