mirror of
https://github.com/HigherOrderCO/Kind1.git
synced 2024-09-11 08:45:32 +03:00
Merge pull request #438 from Kindelia/experimental
fix: problem with duplication of arity error message
This commit is contained in:
commit
57d7631df8
@ -136,13 +136,13 @@ impl<'a> DesugarState<'a> {
|
|||||||
self.desugar_destruct(
|
self.desugar_destruct(
|
||||||
next.range,
|
next.range,
|
||||||
binding,
|
binding,
|
||||||
res_val,
|
res_val.clone(),
|
||||||
&|this| this.desugar_expr(next),
|
&|this| this.desugar_expr(next),
|
||||||
&|this, name| {
|
&|this, name| {
|
||||||
desugared::Expr::let_(
|
desugared::Expr::let_(
|
||||||
range,
|
range,
|
||||||
name.clone(),
|
name.clone(),
|
||||||
this.desugar_expr(val),
|
res_val.clone(),
|
||||||
this.desugar_expr(next),
|
this.desugar_expr(next),
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
@ -124,13 +124,13 @@ impl<'a> DesugarState<'a> {
|
|||||||
self.desugar_destruct(
|
self.desugar_destruct(
|
||||||
next.range,
|
next.range,
|
||||||
destruct,
|
destruct,
|
||||||
res_val,
|
res_val.clone(),
|
||||||
&|this| this.desugar_sttm(bind_ident, pure_ident, next),
|
&|this| this.desugar_sttm(bind_ident, pure_ident, next),
|
||||||
&|this, ident| {
|
&|this, ident| {
|
||||||
desugared::Expr::let_(
|
desugared::Expr::let_(
|
||||||
destruct.locate(),
|
destruct.locate(),
|
||||||
ident.clone(),
|
ident.clone(),
|
||||||
this.desugar_expr(val),
|
res_val.clone(),
|
||||||
this.desugar_sttm(bind_ident, pure_ident, next),
|
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