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

Method Eval

runtime/sam/expr/cast.go:56–62  ·  view source on GitHub ↗
(val super.Value)

Source from the content-addressed store, hash-verified

54}
55
56func (c *casterIntN) Eval(val super.Value) super.Value {
57 v, ok := coerce.ToInt(val, c.typ)
58 if !ok {
59 return c.sctx.WrapError("cannot cast to "+sup.FormatType(c.typ), val)
60 }
61 return super.NewInt(c.typ, v)
62}
63
64type casterUintN struct {
65 sctx *super.Context

Callers

nothing calls this directly

Calls 4

ToIntFunction · 0.92
FormatTypeFunction · 0.92
NewIntFunction · 0.92
WrapErrorMethod · 0.80

Tested by

no test coverage detected