The following won't compile in Swift 6 language mode with Xcode 16b5 (swift-driver version: 1.113 Apple Swift version 6.0 (swiftlang-6.0.0.7.6 clang-1600.0.24.1).
My question is why init() is not isolated to MainActor? Is this some kind of regression that will solve itself in a future beta, or should I be looking at a different pattern for subclassing UIKit classes?
import UIKit
class MyView: UIView {
init() {
super.init(frame: .zero) // Call to main actor-isolated initializer 'init(frame:)' in a synchronous nonisolated context
}
@available(*, unavailable)
required init?(coder: NSCoder) {
fatalError("use init()")
}
}