TypeCheck implements the Expr interface.
( ctx context.Context, semaCtx *SemaContext, desired *types.T, )
| 1093 | |
| 1094 | // TypeCheck implements the Expr interface. |
| 1095 | func (expr *NotExpr) TypeCheck( |
| 1096 | ctx context.Context, semaCtx *SemaContext, desired *types.T, |
| 1097 | ) (TypedExpr, error) { |
| 1098 | exprTyped, err := typeCheckAndRequireBoolean(ctx, semaCtx, expr.Expr, "NOT argument") |
| 1099 | if err != nil { |
| 1100 | return nil, err |
| 1101 | } |
| 1102 | expr.Expr = exprTyped |
| 1103 | expr.typ = types.Bool |
| 1104 | return expr, nil |
| 1105 | } |
| 1106 | |
| 1107 | // TypeCheck implements the Expr interface. |
| 1108 | func (expr *IsNullExpr) TypeCheck( |
nothing calls this directly
no test coverage detected