Home / Docs / Diagnostics
U2005: Unknown argument label
Release v0.4.0
A label names a parameter of the function, operation or handler that is called (spec/04 §3). Function values, such as parameters of function type and lambdas, take their arguments by position and without labels, since a function type has no parameter names; so does a policy, which takes one argument (ADR 0024). The diagnostic suggests the closest parameter name when there is one.
The repair at a glance
diff
module demo
- pub larger(x: Int) -> Int = max(x, c: 10)
+ pub larger(x: Int) -> Int = max(x, b: 10)Failing example
una
module demo
pub larger(x: Int) -> Int = max(x, c: 10)Fixed example
una
module demo
pub larger(x: Int) -> Int = max(x, b: 10)