MustBeDInt attempts to retrieve a DInt from an Expr, panicking if the assertion fails.
(e Expr)
| 693 | // MustBeDInt attempts to retrieve a DInt from an Expr, panicking if the |
| 694 | // assertion fails. |
| 695 | func MustBeDInt(e Expr) DInt { |
| 696 | i, ok := AsDInt(e) |
| 697 | if !ok { |
| 698 | panic(errors.AssertionFailedf("expected *DInt, found %T", e)) |
| 699 | } |
| 700 | return i |
| 701 | } |
| 702 | |
| 703 | // ResolvedType implements the TypedExpr interface. |
| 704 | func (*DInt) ResolvedType() *types.T { |
no test coverage detected
searching dependent graphs…