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

Function unionToExpr

compiler/semantic/sem/expr.go:551–554  ·  view source on GitHub ↗
(loc ast.Node, typ *super.TypeUnion, bytes scode.Bytes)

Source from the content-addressed store, hash-verified

549}
550
551func unionToExpr(loc ast.Node, typ *super.TypeUnion, bytes scode.Bytes) Expr {
552 innerType, innerBytes := typ.Untag(bytes)
553 return NewCast(loc, valueToExpr(loc, innerType, innerBytes), typ)
554}
555
556func mapToExpr(loc ast.Node, typ *super.TypeMap, bytes scode.Bytes) Expr {
557 keyType := super.TypeUnder(typ.KeyType)

Callers 1

valueToExprFunction · 0.85

Calls 3

NewCastFunction · 0.85
valueToExprFunction · 0.85
UntagMethod · 0.80

Tested by

no test coverage detected