MustBeDInt attempts to retrieve a DInt from an Expr, panicking if the assertion fails.
(e Expr)
| 637 | // MustBeDInt attempts to retrieve a DInt from an Expr, panicking if the |
| 638 | // assertion fails. |
| 639 | func MustBeDInt(e Expr) DInt { |
| 640 | i, ok := AsDInt(e) |
| 641 | if !ok { |
| 642 | panic(errors.AssertionFailedf("expected *DInt, found %T", e)) |
| 643 | } |
| 644 | return i |
| 645 | } |
| 646 | |
| 647 | // ResolvedType implements the TypedExpr interface. |
| 648 | func (*DInt) ResolvedType() *types.T { |
no test coverage detected
searching dependent graphs…