mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
add a TypedHole node to Expr, for use in the editor
This commit is contained in:
parent
2c09907116
commit
f285e7ce93
6 changed files with 23 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue