I can't understand why unwrapping an optional value is possible in this case:
let name: String? = "Toto"
guard let name = name else { fatalError() }
print(name)
but not when this snippet is wrapped in a for-loop:
for _ in 0..<100 {
let name: String? = "Toto"
guard let name = name else { fatalError() }
print(name)
}
I got the error "Definition conflicts with previous value".
Using Swift 5 in Xcode 11.0.