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 *SemaContext, desired *types.T)
| 45 | // desired. This restriction is also true of most methods and functions related |
| 46 | // to type checking. |
| 47 | TypeCheck(ctx *SemaContext, desired *types.T) (TypedExpr, error) |
| 48 | } |
| 49 | |
| 50 | // TypedExpr represents a well-typed expression. |
no outgoing calls