Avatar
Avatar
omochimetaru
@swift-5.9.2 var a = [1, 2] var b = a[...] print(b) print(b.popFirst()) print(b)
[1, 2] Optional(1) [2]<stdin>:4:7: warning: expression implicitly coerced from 'Int?' to 'Any' print(b.popFirst()) ^~~~~~~~~~~~ <stdin>:4:9: note: provide a default value to avoid this warning print(b.popFirst()) ~~^~~~~~~~~~ ?? <#default value#> <stdin>:4:9: note: force-unwrap the value to avoid this warning print(b.popFirst()) ~~^~~~~~~~~~ ! <stdin>:4:9: note: explicitly cast to 'Any' with 'as Any' to silence this warning print(b.popFirst()) ~~^~~~~~~~~~ as Any