mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
15 lines
290 B
Swift
15 lines
290 B
Swift
// RUN: %swift -parse %s -verify
|
|
|
|
|
|
class X {
|
|
init withInt(i: Int) -> Self {
|
|
self.init(withDouble: Double(i))
|
|
}
|
|
|
|
init withFloat(f: Float) -> Self { // expected-error{{complete object initializer for 'X' must delegate (with 'self.init')}}
|
|
}
|
|
|
|
init withDouble(d: Double) {
|
|
}
|
|
}
|