I'm writing some code that makes use of the type of an
ImplicitlyUwrappedOptional, like so:
let signature = (@convention(c) () -> Void)!.self
dlsym; so I need to perform an
unsafeBitCast with this later)
In the latest beta of Xcode, I'm getting the warning "
Using '!' in this location is deprecated and will be removed in a future release; consider changing this to '?' instead", which I understand is supposed to be for of SE-0054: Abolish
ImplicitlyUnwrappedOptional type (specifically, from this pull request). However, I don't see how it applied to my case: I'm taking the type of an
ImplicitlyUnwrappedOptional, not using it in a nested type. Interestingly, this gets away with no warnings:
let signature = ImplicitlyUnwrappedOptional<(@convention(c) () -> Void)>.self
Is there a bug here, or am I misunderstand this (if so, could someone explain what's wrong with it)?