ARTICLE AD BOX
Given the following code:
func f(a: Int, _ b: Int = 0) { print("1 \(a + b)") } func f(a: Int) { print("2 \(a)") } f(a: 42)It prints out "2 42".
Two questions:
why does it select second function?
how do I force it to call the first function?
3,53710 gold badges62 silver badges112 bronze badges
