Details
-
Improvement
-
Status: Backlog
-
Major - P3
-
Resolution: Unresolved
-
None
-
None
Description
As of Swift 5.1 / SE-0242 the compiler will generate the initializers we need if we just provide the default values on the properties themselves.
E.g. we can change any place we have something like the following:
struct SomeOptions {
|
var x: Int?
|
|
init(x: Int? = nil) {
|
self.x = x
|
}
|
}
|
to just
struct SomeOptions {
|
var x: Int? = nil
|
}
|
Attachments
Issue Links
- has to be done after
-
SWIFT-618 Bump minimum Swift version to 5.1, and start testing against Swift 5.2
-
- Closed
-