diff --git a/crates/reporting/src/error/parse.rs b/crates/reporting/src/error/parse.rs index 674ae02663..e099dc87fc 100644 --- a/crates/reporting/src/error/parse.rs +++ b/crates/reporting/src/error/parse.rs @@ -290,7 +290,10 @@ fn to_expr_report<'a>( ]) .indent(4), alloc.reflow("And to define a function:"), - alloc.reflow("increment = \\n -> n + 1").indent(4), + alloc.vcat(vec![ + alloc.text("increment : I64 -> I64"), + alloc.text("increment = \\n -> n + 1"), + ]).indent(4) ])] } }, diff --git a/crates/reporting/tests/test_reporting.rs b/crates/reporting/tests/test_reporting.rs index b8524d110d..452b009380 100644 --- a/crates/reporting/tests/test_reporting.rs +++ b/crates/reporting/tests/test_reporting.rs @@ -5653,6 +5653,7 @@ All branches in an `if` must have the same type! And to define a function: + increment : I64 -> I64 increment = \n -> n + 1 "###