TypeCheck transforms the Expr into a well-typed TypedExpr, which further permits evaluation and type introspection, or an error if the expression cannot be well-typed. When type checking is complete, if no error was reported, the expression and all sub-expressions will be guaranteed to be well-typed
(ctx context.Context, semaCtx *SemaContext, desired *types.T)
| 59 | // desired. This restriction is also true of most methods and functions related |
| 60 | // to type checking. |
| 61 | TypeCheck(ctx context.Context, semaCtx *SemaContext, desired *types.T) (TypedExpr, error) |
| 62 | } |
| 63 | |
| 64 | // TypedExpr represents a well-typed expression. |
no outgoing calls
no test coverage detected