E4086#
The labels are required by this function, but not supplied.
Sometimes this error occurs when you mistakenly treat a labelled argument as a positional argument. There are some common functions that require labelled arguments, such as:
@test.snapshot. Remember to supplyfilenameas a labelled argument.@test.inspect. Remember to supplycontentas a labelled argument.
Erroneous example#
///|
pub fn f(name~ : String) -> Unit {
println("Hello, \{name}")
}
///|
test {
f("John") // Error: The labels name~ are required by this function, but not supplied.
}
Suggestion#
Check the signature of the function and provide the correct labelled argument.
///|
pub fn f(name~ : String) -> Unit {
println("Hello, \{name}")
}
///|
test {
f(name="John")
}