Skip to content

Commit aef6e7c

Browse files
committed
Add CHECK: lines to explicitly verify some dodgy requirement signatures
1 parent bbd5691 commit aef6e7c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

validation-test/compiler_crashers_2_fixed/0173-circular-generic-type-alias-deserialization.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-build-swift -emit-module-path %t/foo.swiftmodule %s
2+
// RUN: %target-build-swift -emit-module-path %t/foo.swiftmodule -Xfrontend -debug-generic-signatures -Xfrontend -requirement-machine-protocol-signatures=on %s 2>&1 | %FileCheck %s
33

44
public protocol P { }
55
public struct X<T: P> {
66
public init() { }
77
}
8+
9+
// CHECK-LABEL: main.(file).Q@
10+
// CHECK-NEXT: Requirement signature: <Self where Self.A : P, Self.C : Collection, Self.C.Element == X<Self.A>>
811
public protocol Q {
912
associatedtype A: P
1013
associatedtype C: Collection where C.Element == MyX

validation-test/compiler_crashers_2_fixed/sr11639.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -emit-ir -primary-file %s
1+
// RUN: %target-swift-frontend -emit-ir -primary-file %s -debug-generic-signatures -requirement-machine-protocol-signatures=on 2>&1 | %FileCheck %s
22

33
public protocol FooProtocol {
44
associatedtype Bar
@@ -13,3 +13,6 @@ public protocol BazProtocol: FooProtocol {
1313
associatedtype Foo2Bar
1414
typealias Foo2 = Foo<Foo2Bar>
1515
}
16+
17+
// CHECK-LABEL: sr11639.(file).BazProtocol@
18+
// CHECK-NEXT: Requirement signature: <Self where Self : FooProtocol, Self.Foo1 : FooProtocol, Self.Foo2Bar == Self.Foo1.Bar>

0 commit comments

Comments
 (0)