Sema: Use diagnoseOrDefer() in ConformanceChecker::ensureRequirementsAreSatisfied()

This commit is contained in:
Slava Pestov
2024-01-20 23:08:08 -05:00
parent 2973e3ff45
commit 525b6effc6
7 changed files with 19 additions and 27 deletions

View File

@@ -7,7 +7,7 @@
import Distributed
distributed actor DA {
// expected-error@-1{{distributed actor 'DA' does not declare ActorSystem it can be used with.}}
// expected-error@-1{{distributed actor 'DA' does not declare ActorSystem it can be used with}}
// Since synthesis would have failed due to the missing ActorSystem:
// expected-error@-4{{type 'DA' does not conform to protocol 'Encodable'}}
@@ -23,7 +23,7 @@ distributed actor DA {
// we need to fail gracefully, rather than crash trying to use the non-existing type.
//
// Test case for: https://github.com/apple/swift/issues/58663
distributed actor Server { // expected-error 2 {{distributed actor 'Server' does not declare ActorSystem it can be used with.}}
distributed actor Server { // expected-error 2 {{distributed actor 'Server' does not declare ActorSystem it can be used with}}
// expected-note@-1{{you can provide a module-wide default actor system by declaring:}}
typealias ActorSystem = DoesNotExistDataSystem
// expected-error@-1{{cannot find type 'DoesNotExistDataSystem' in scope}}