// RUN: %empty-directory(%t) // RUN: %target-swift-frontend -enable-experimental-concurrency -emit-module-path %t/a.swiftmodule -module-name a %s // RUN: llvm-bcanalyzer -dump %t/a.swiftmodule | %FileCheck -check-prefix BC-CHECK %s // RUN: %target-swift-ide-test -print-module -module-to-print a -source-filename x -I %t | %FileCheck -check-prefix MODULE-CHECK %s // RUN: %target-swift-frontend -enable-experimental-concurrency -emit-module-path %t/b.swiftmodule -module-name a %t/a.swiftmodule // RUN: cmp -s %t/a.swiftmodule %t/b.swiftmodule // REQUIRES: concurrency /////////// // This test checks for correct serialization & deserialization of // @actorIndependent and @actorIndependent(unsafe) // look for correct annotation after first deserialization's module print: // MODULE-CHECK: actor UnsafeCounter { // MODULE-CHECK-NEXT: @actorIndependent(unsafe) var storage: Int // MODULE-CHECK-NEXT: @actorIndependent var count: Int // MODULE-CHECK-NEXT: var actorCount: Int // MODULE-CHECK-NEXT: init() // MODULE-CHECK-NEXT: } // and look for unsafe and safe versions of decl in BC dump: // BC-CHECK-NOT: UnknownCode // BC-CHECK: // BC-CHECK: actor UnsafeCounter { @actorIndependent(unsafe) private var storage : Int = 0 @actorIndependent var count : Int { get { storage } set { storage = newValue } } var actorCount : Int { get { storage } set { storage = newValue } } }