File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
Inputs/external-protocol-conformance Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change
1
+ protocol PHelper {
2
+ }
3
+
4
+ protocol P {
5
+ associatedtype Assoc : PHelper // expected-note {{protocol requires nested type 'Assoc'}}
6
+ }
7
+
8
+ struct A : P { // expected-error {{type 'A' does not conform to protocol 'P'}}
9
+ typealias Assoc = Int // expected-note {{possibly intended match 'Assoc' (aka 'Int') does not conform to 'PHelper'}}
10
+ }
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend -emit-ir -verify %s %S/Inputs/external-protocol-conformance/A.swift
2
+
3
+ func generic< T: P > ( value: T ) { }
4
+
5
+ // The goal here is to verify that a dependency on an invalid associated
6
+ // type in a protocol conformance in another file will prevent code
7
+ // generation.
8
+ func useGeneric( ) {
9
+ generic ( value: A ( ) )
10
+ }
You can’t perform that action at this time.
0 commit comments