Open
Description
fn foo(a: u32 = 123456, b: u32) {
println("a={}, b={}", a, b)
}
fn main() {
foo(a: 123, b: 456) // Prints "a=123, b=456" as expected.
foo(b: 456, a: 123) // Prints "a=123456, b=456". What?
foo(b: 456, real_arg: abort() - real_var) // Wait, this argument is completely ignored!
}
Function overload resolution seems to catch all the errors if the call has too many arguments.
Metadata
Assignees
Labels
No labels
Activity