I went to try using opaque types in my code using the Xcode 11 beta, and immediately ran into not being able to use optionals.
For example, I have this line (where
Blob is a protocol):
func fileBlob(ref: String, path: String) -> Blob?
If I insert "
some" before "
Blob?", I get the error: "An 'opaque' type must specify only 'Any', 'AnyObject', protocols, and/or a base class".
I followed the discussion while this feature was in review, and never even thought about how it would work with optionals. I guess I just assumed
some Blob? would be equally valid. Has anyone else run into this? Is there a workaround?