Where did CoreMedia Swift syntactic sugar go?

At some point (Swift 4?) I found it became possible to use dot notation for CoreMedia object properties, so code like this


let asbd = CMAudioFormatDescriptionGetStreamBasicDescription(CMSampleBufferGetFormatDescription(sampleBuffer)!)!.pointee


became

let asbd = sampleBuffer.formatDescription!.audioStreamBasicDescription!.pointee

This no longer compiles (Xcode10.1/Swift 4.2). I'm pretty sure I didn't dream this, does anyone know what happened?

Replies

Just a note that Xcode 10.1 is Swift 4.2.1... Xcode 10.0 was Swift 4.2. Seems odd you'd see issues now, tho.


Any errors when it won't compile you can share?


Any chance you've tried Xcode10.2 bx?


Might want to file a bug and see what comes back, adding your report # to your thread for ref.