I'm doing the following, but I'm getting the following warning:
'let' pattern has no effect; sub-pattern didn't bind any variables
enum Seat {
case middle
case window
case aisle(Int)
}
let m : Seat = .middle
let w : Seat = .window
let a : Seat = .aisle(5)
let seats = [m,w,a]
for seat in seats {
if case let .middle = seat {
print("middle")
}
if case let .window = seat {
print("window")
}
if case let Seat.aisle(row) = seat {
print("able to let row be the associatedvalue of seat; its value is: \(row)")
}
}