TypeCheck implements the Expr interface.
( ctx context.Context, semaCtx *SemaContext, desired *types.T, )
| 1106 | |
| 1107 | // TypeCheck implements the Expr interface. |
| 1108 | func (expr *IsNullExpr) TypeCheck( |
| 1109 | ctx context.Context, semaCtx *SemaContext, desired *types.T, |
| 1110 | ) (TypedExpr, error) { |
| 1111 | exprTyped, err := expr.Expr.TypeCheck(ctx, semaCtx, types.Any) |
| 1112 | if err != nil { |
| 1113 | return nil, err |
| 1114 | } |
| 1115 | expr.Expr = exprTyped |
| 1116 | expr.typ = types.Bool |
| 1117 | return expr, nil |
| 1118 | } |
| 1119 | |
| 1120 | // TypeCheck implements the Expr interface. |
| 1121 | func (expr *IsNotNullExpr) TypeCheck( |