mirror of
https://github.com/HigherOrderCO/Kind1.git
synced 2024-09-11 08:45:32 +03:00
fix: problem with duplication of arity error message
This commit is contained in:
parent
16d320a0dd
commit
ccba3b507c
@ -136,13 +136,13 @@ impl<'a> DesugarState<'a> {
|
||||
self.desugar_destruct(
|
||||
next.range,
|
||||
binding,
|
||||
res_val,
|
||||
res_val.clone(),
|
||||
&|this| this.desugar_expr(next),
|
||||
&|this, name| {
|
||||
desugared::Expr::let_(
|
||||
range,
|
||||
name.clone(),
|
||||
this.desugar_expr(val),
|
||||
res_val.clone(),
|
||||
this.desugar_expr(next),
|
||||
)
|
||||
},
|
||||
|
@ -124,13 +124,13 @@ impl<'a> DesugarState<'a> {
|
||||
self.desugar_destruct(
|
||||
next.range,
|
||||
destruct,
|
||||
res_val,
|
||||
res_val.clone(),
|
||||
&|this| this.desugar_sttm(bind_ident, pure_ident, next),
|
||||
&|this, ident| {
|
||||
desugared::Expr::let_(
|
||||
destruct.locate(),
|
||||
ident.clone(),
|
||||
this.desugar_expr(val),
|
||||
res_val.clone(),
|
||||
this.desugar_sttm(bind_ident, pure_ident, next),
|
||||
)
|
||||
},
|
||||
|
12
crates/kind-tests/suite/issues/checker/ArityOnLet.golden
Normal file
12
crates/kind-tests/suite/issues/checker/ArityOnLet.golden
Normal file
@ -0,0 +1,12 @@
|
||||
ERROR Incorrect arity.
|
||||
|
||||
/--[suite/issues/checker/ArityOnLet.kind2:6:13]
|
||||
|
|
||||
5 | ArityOnLet =
|
||||
6 | let a = A
|
||||
| v
|
||||
| \This function requires a fixed number of arguments
|
||||
7 | 2
|
||||
|
||||
Hint: This function expects 1 arguments but got 0
|
||||
|
7
crates/kind-tests/suite/issues/checker/ArityOnLet.kind2
Normal file
7
crates/kind-tests/suite/issues/checker/ArityOnLet.kind2
Normal file
@ -0,0 +1,7 @@
|
||||
A (n : U60) : U60
|
||||
A n = n
|
||||
|
||||
ArityOnLet : U60
|
||||
ArityOnLet =
|
||||
let a = A
|
||||
2
|
Loading…
Reference in New Issue
Block a user