Home / Docs / Diagnostics
U2006: Duplicate argument
Release v0.4.0
Each parameter receives exactly one argument, whether by position, by label or by punning (spec/04 §3). Likewise, a constructor gives each field once, and a pattern binds each field once.
The repair at a glance
diff
module demo
- pub larger(x: Int) -> Int = max(a: x, a: 10)
+ pub larger(x: Int) -> Int = max(a: x, b: 10)Failing example
una
module demo
pub larger(x: Int) -> Int = max(a: x, a: 10)Fixed example
una
module demo
pub larger(x: Int) -> Int = max(a: x, b: 10)