MuniekMg
(Tomasz)
1
Hi, i'm using Xcode 13.1, I was epxerimenting with Actors in Swift Concurrency and during testing this statement:
From outside a module, immutable let s must be referenced asynchronously from outside the actor.
from this document: proposal-0306
I created Swift Package with simple Actor inside:
public actor TestActor {
public let name: String = "Muniek"
public var age: Int = 20
public init() {
}
}
Then used this package in Xcode project:
let testActor = TestActor() // Actor from other module 'MyTestPackage'
func testFunc() async {
// age - var property
print(await testActor.age) // OK
// name - let property
print(await testActor.name) // Segmentation fault: 11
}
Building this project ends with fail Segmentation fault: 11
mickeyl
(Dr. Mickey Lauer)
2
Can you build it on the commandline with swift build and show the output? It might be one of the silgen regressions that were introduced with Swift 5.5, e.g., [SR-14988] Regression: Swift 5.5 compiler crashes during SILGEN (5.4 ok) · Issue #57330 · apple/swift · GitHub