mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Fix unifying pure with flex vars
This commit is contained in:
parent
6533e9084d
commit
89a918cebe
12 changed files with 230 additions and 154 deletions
|
@ -204,7 +204,7 @@ pub fn can_expr_with<'a>(
|
|||
rigids: MutMap::default(),
|
||||
home,
|
||||
resolutions_to_make: vec![],
|
||||
enclosing_fx: None,
|
||||
fx_expectation: None,
|
||||
},
|
||||
loc_expr.region,
|
||||
&loc_expr.value,
|
||||
|
|
|
@ -5419,9 +5419,9 @@ mod test_reporting {
|
|||
6│ 2 -> 2
|
||||
^^
|
||||
|
||||
Looks like you are trying to define a function.
|
||||
Looks like you are trying to define a function.
|
||||
|
||||
In Roc, functions are always written as a lambda, like
|
||||
In Roc, functions are always written as a lambda, like
|
||||
|
||||
increment = \n -> n + 1
|
||||
"#
|
||||
|
@ -14762,6 +14762,16 @@ All branches in an `if` must have the same type!
|
|||
|
||||
You can still run the program with this error, which can be helpful
|
||||
when you're debugging.
|
||||
|
||||
── UNNECESSARY EXCLAMATION in /code/proj/Main.roc ──────────────────────────────
|
||||
|
||||
This function is pure, but its name suggests otherwise:
|
||||
|
||||
5│ main! = \{} ->
|
||||
^^^^^
|
||||
|
||||
Remove the exclamation mark to give an accurate impression of its
|
||||
behavior.
|
||||
"###
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue