add a TypedHole node to Expr, for use in the editor

This commit is contained in:
Folkert 2022-05-18 16:39:24 +02:00
parent 2c09907116
commit f285e7ce93
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
6 changed files with 23 additions and 3 deletions

View file

@ -1144,6 +1144,15 @@ pub fn constrain_expr(
arg_cons.push(eq);
constraints.exists_many(vars, arg_cons)
}
TypedHole(var) => {
// store the expected type for this position
constraints.equal_types_var(
*var,
expected,
Category::Storage(std::file!(), std::line!()),
region,
)
}
RuntimeError(_) => {
// Runtime Errors have no constraints because they're going to crash.
Constraint::True