Skip to content

Commit 934ec4d

Browse files
authored
Merge pull request swiftlang#36440 from DougGregor/concurrentvalue-only-warn-concurrency
2 parents d608cb5 + 5b2afec commit 934ec4d

File tree

6 files changed

+10
-11
lines changed

6 files changed

+10
-11
lines changed

lib/Sema/TypeCheckConcurrency.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -892,8 +892,7 @@ static bool diagnoseNonConcurrentProperty(
892892
/// missing.
893893
static bool shouldDiagnoseNonConcurrentValueViolations(
894894
const LangOptions &langOpts) {
895-
return langOpts.EnableExperimentalConcurrency ||
896-
langOpts.WarnConcurrency;
895+
return langOpts.WarnConcurrency;
897896
}
898897

899898
bool swift::diagnoseNonConcurrentTypesInReference(

test/Concurrency/actor_call_implicitly_async.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -enable-experimental-concurrency
1+
// RUN: %target-typecheck-verify-swift -enable-experimental-concurrency -warn-concurrency
22
// REQUIRES: concurrency
33

44
actor BankAccount {

test/Concurrency/actor_isolation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -enable-experimental-concurrency
1+
// RUN: %target-typecheck-verify-swift -enable-experimental-concurrency -warn-concurrency
22
// REQUIRES: concurrency
33

44
let immutableGlobal: String = "hello"

test/Concurrency/actor_keypath_isolation.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -enable-experimental-concurrency
1+
// RUN: %target-typecheck-verify-swift -enable-experimental-concurrency -warn-concurrency
22
// REQUIRES: concurrency
33

44
class Box {
@@ -19,7 +19,7 @@ actor Door {
1919
var getOnlyInt : Int {
2020
get { 0 }
2121
}
22-
22+
2323
@actorIndependent(unsafe) var unsafeIndependent : Int = 0
2424

2525
@MainActor var globActor_mutable : Int = 0
@@ -68,7 +68,7 @@ func tryNonConcurrentValue() {
6868

6969
func tryKeypaths() {
7070
_ = \Door.unsafeGlobActor_immutable
71-
_ = \Door.unsafeGlobActor_mutable
71+
_ = \Door.unsafeGlobActor_mutable // expected-error{{cannot form key path to actor-isolated property 'unsafeGlobActor_mutable'}}
7272

7373
_ = \Door.immutable
7474
_ = \Door.unsafeIndependent
@@ -87,4 +87,4 @@ func tryKeypaths() {
8787
_ = \Door.globActor_mutable // expected-error{{cannot form key path to actor-isolated property 'globActor_mutable'}}
8888
_ = \Door.[0] // expected-error{{cannot form key path to actor-isolated subscript 'subscript(_:)'}}
8989
_ = \Door.["hello"] // expected-error{{cannot form key path to actor-isolated subscript 'subscript(_:)'}}
90-
}
90+
}

test/Concurrency/concurrent_value_checking.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -enable-experimental-concurrency
1+
// RUN: %target-typecheck-verify-swift -enable-experimental-concurrency -warn-concurrency
22
// REQUIRES: concurrency
33

44
class NotConcurrent { }

test/attr/attr_objc_async.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// RUN: %target-swift-frontend -disable-objc-attr-requires-foundation-module -typecheck -verify -verify-ignore-unknown %s -swift-version 5 -enable-source-import -I %S/Inputs -enable-experimental-concurrency
1+
// RUN: %target-swift-frontend -disable-objc-attr-requires-foundation-module -typecheck -verify -verify-ignore-unknown %s -swift-version 5 -enable-source-import -I %S/Inputs -enable-experimental-concurrency -warn-concurrency
22
// RUN: %target-swift-ide-test -skip-deinit=false -print-ast-typechecked -source-filename %s -function-definitions=true -prefer-type-repr=false -print-implicit-attrs=true -explode-pattern-binding-decls=true -disable-objc-attr-requires-foundation-module -swift-version 5 -enable-source-import -I %S/Inputs -enable-experimental-concurrency | %FileCheck %s
3-
// RUN: not %target-swift-frontend -typecheck -dump-ast -disable-objc-attr-requires-foundation-module %s -swift-version 5 -enable-source-import -I %S/Inputs -enable-experimental-concurrency > %t.ast
3+
// RUN: not %target-swift-frontend -typecheck -dump-ast -disable-objc-attr-requires-foundation-module %s -swift-version 5 -enable-source-import -I %S/Inputs -enable-experimental-concurrency -warn-concurrency > %t.ast
44
// RUN: %FileCheck -check-prefix CHECK-DUMP %s < %t.ast
55
// REQUIRES: objc_interop
66
// REQUIRES: concurrency

0 commit comments

Comments
 (0)