mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[gardening] Remove redundant nil-initialization of optional variable
From the Swift documentation: "If you define an optional variable without providing a default value, the variable is automatically set to nil for you."
This commit is contained in:
@@ -288,8 +288,8 @@ default:
|
||||
|
||||
|
||||
// Optional patterns.
|
||||
let op1 : Int? = nil
|
||||
let op2 : Int?? = nil
|
||||
let op1 : Int?
|
||||
let op2 : Int??
|
||||
|
||||
switch op1 {
|
||||
case nil: break
|
||||
|
||||
Reference in New Issue
Block a user