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