(val super.Value)
| 92 | } |
| 93 | |
| 94 | func (c *casterFloat) Eval(val super.Value) super.Value { |
| 95 | f, ok := coerce.ToFloat(val, c.typ) |
| 96 | if !ok { |
| 97 | return c.sctx.WrapError("cannot cast to "+sup.FormatType(c.typ), val) |
| 98 | } |
| 99 | return super.NewFloat(c.typ, f) |
| 100 | } |
| 101 | |
| 102 | type casterIP struct { |
| 103 | sctx *super.Context |
nothing calls this directly
no test coverage detected