Skip to content

Commit b9c5ebe

Browse files
committed
Fix tests
1 parent 0310f4a commit b9c5ebe

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

test/Concurrency/actor_isolation_swift6.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func checkIsolationValueType(_ formance: InferredFromConformance,
5959
_ = await anno.counter // expected-warning {{no 'async' operations occur within 'await' expression}}
6060

6161
// these do need await, regardless of reference or value type
62-
_ = await (formance as MainCounter).counter
62+
_ = await (formance as any MainCounter).counter
6363
_ = await ext[1]
6464
_ = await formance.ticker
6565
_ = await ext.polygon

test/type/explicit_existential_swift6.swift

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,6 @@ protocol HasAssoc {
6363
associatedtype Assoc
6464
func foo()
6565
}
66-
struct foo {
67-
func existentialArray() -> [HasAssoc] {}
68-
func existentialcSequence() -> Sequence<HasAssoc> {}
69-
70-
}
7166

7267
do {
7368
enum MyError: Error {
@@ -207,7 +202,7 @@ protocol RawRepresentable {
207202
enum E1: RawRepresentable {
208203
typealias RawValue = P1
209204

210-
var rawValue: P1 {
205+
var rawValue: P1 { // expected-error {{use of protocol 'P1' as a type must be written 'any P1'}}{{17-19=any P1}}
211206
return ConcreteComposition()
212207
}
213208
}
@@ -282,8 +277,8 @@ func testFunctionAlias(fn: ExistentialFunction) {}
282277
typealias Constraint = Input
283278
typealias ConstraintB = Input & InputB
284279

285-
// expected-error@+2{{use of 'Constraint' (aka 'Input') as a type must be written 'any Constraint'}}{{29-39=any Constraint}}
286-
// expected-error@+1{{use of 'ConstraintB' (aka 'InputB & Input') as a type must be written 'any ConstraintB' (aka 'any InputB & Input')'}}{{44-55=any Constraint}}
280+
//expected-error@+2{{use of 'Constraint' (aka 'Input') as a type must be written 'any Constraint' (aka 'any Input')}}
281+
//expected-error@+1 2{{use of 'ConstraintB' (aka 'Input & InputB') as a type must be written 'any ConstraintB' (aka 'any Input & InputB')}}
287282
func testConstraintAlias(x: Constraint, y: ConstraintB) {}
288283

289284
typealias Existential = any Input
@@ -358,6 +353,7 @@ func testEnumAssociatedValue() {
358353
case c1((any HasAssoc) -> Void)
359354
// expected-error@+1 {{use of protocol 'HasAssoc' as a type must be written 'any HasAssoc'}}
360355
case c2((HasAssoc) -> Void)
356+
// expected-error@+1 {{use of protocol 'P' as a type must be written 'any P'}}
361357
case c3((P) -> Void)
362358
}
363359
}

0 commit comments

Comments
 (0)