You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would expect that everything in `Foo` was constrained to the `MainActor`, but this produces this error with the 2021-12-23 main snapshot (org.swift.50202112231a):
% TOOLCHAINS=org.swift.50202112231a xcrun swiftc /tmp/foo2.swift -sdk /Applications/Xcode-13.0.0-RC1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.0.sdk -target x86_64-apple-ios12.0-simulator
/tmp/foo2.swift:7:15: error: call to main actor-isolated initializer 'init(frame:)' in a synchronous nonisolated context
super.init(frame: .zero)
^
UIKit.UIView:4:12: note: calls to initializer 'init(frame:)' from outside of its actor context are implicitly asynchronous
public init(frame: CGRect)
^
Marking the `init` function with `MainActor` as well as the class fixes this
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: df5f376c11c24d77b7e241a9c0d14f7a
Issue Description:
With this source:
I would expect that everything in `Foo` was constrained to the `MainActor`, but this produces this error with the 2021-12-23 main snapshot (org.swift.50202112231a):
Marking the `init` function with `MainActor` as well as the class fixes this
The text was updated successfully, but these errors were encountered: