E4084#
The label is supplied twice when calling a function with labelled parameters.
Erroneous Example#
///|
pub fn f(a~ : Int) -> Unit {
println("Hello, \{a}")
}
///|
test {
f(a=0, a=1)
}
Suggestion#
If the call only needs one labelled argument, provide that label once.
///|
pub fn f(a~ : Int) -> Unit {
println("Hello, \{a}")
}
///|
test {
f(a=0)
}
If the function has multiple labelled parameters and the duplicate label came from a typo, change the duplicated label to the correct one.
///|
pub fn g(a~ : Int, b~ : Int) -> Unit {
println("Hello, \{a} and \{b}")
}
///|
test {
g(a=0, b=1)
}