MCPcopy
hub / github.com/google/mangle / IsUnionTypeExpression

Function IsUnionTypeExpression

symbols/typeexprs.go:151–154  ·  view source on GitHub ↗

IsUnionTypeExpression returns true if tpe is a UnionType.

(tpe ast.BaseTerm)

Source from the content-addressed store, hash-verified

149
150// IsUnionTypeExpression returns true if tpe is a UnionType.
151func IsUnionTypeExpression(tpe ast.BaseTerm) bool {
152 op := typeOp(tpe)
153 return op != nil && op.Symbol == UnionType.Symbol
154}
155
156// IsRelTypeExpression returns true if tpe is a RelType.
157func IsRelTypeExpression(tpe ast.BaseTerm) bool {

Callers 5

refineNegativeMethod · 0.92
StructTypeFieldFunction · 0.85
UnionTypeArgsFunction · 0.85
RemoveFromUnionTypeFunction · 0.85
RelTypeAlternativesFunction · 0.85

Calls 1

typeOpFunction · 0.85

Tested by

no test coverage detected