File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
validation-test/compiler_crashers_2 Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: not --crash %target-swift-frontend %s -typecheck
2
+ public struct Foo < A, B, C> { }
3
+
4
+ public protocol P {
5
+ associatedtype PA
6
+ associatedtype PB = Never
7
+ associatedtype PC = Never
8
+
9
+ typealias Context = Foo < PA , PB , PC >
10
+
11
+ func f1( _ x: Context , _ y: PA )
12
+ func f2( _ x: Context , _ y: PB )
13
+ func f3( _ x: Context , _ y: PC )
14
+ func f4( _ x: Context )
15
+ }
16
+
17
+ public extension P {
18
+ public func f1( _ x: Context , _ y: PA ) {
19
+ }
20
+ public func f2( _ x: Context , _ y: PB ) {
21
+ }
22
+ public func f3( _ x: Context , _ y: PC ) {
23
+ }
24
+ public func f4( _ x: Context ) {
25
+ }
26
+ }
27
+
28
+ public struct S : P {
29
+ public typealias PA = String
30
+ public typealias PB = Int
31
+
32
+ public func f1( _ x: Context , _ y: PA ) {
33
+ }
34
+ public func f2( _ x: Context , _ y: PB ) {
35
+ }
36
+ }
You can’t perform that action at this time.
0 commit comments