Issue #696
Which methods do you think are used here
import Cocoa
struct Robot {
let a: Int
let b: Int
let c: Int
init(a: Int = 1, c: Int = 3) {
self.a = a
self.b = 0
self.c = c
print("Init with a=\(a) and c=\(c)")
}
init(a: Int = 1, b: Int = 2, c: Int = 3) {
self.a = a
self.b = b
self.c = c
print("Init with a\(a), b=\(b) and c=\(c)")
}
}
let r1 = Robot(c: 10)
let r2 = Robot(a: 5, c: 10)
let r3 = Robot(a: 5, b: 7, c: 10)
let r4 = Robot(a: 5)
let r5 = Robot(b: 5)
The log is
Init with a=1 and c=10
Init with a=5 and c=10
Init with a5, b=7 and c=10
Init with a=5 and c=3
Init with a1, b=5 and c=3