File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
validation-test/SILOptimizer Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -4167,8 +4167,9 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
4167
4167
4168
4168
auto lookupType = AMI->getLookupType ();
4169
4169
if (getLocalArchetypeOf (lookupType) || lookupType->hasDynamicSelfType ()) {
4170
- require (AMI->getTypeDependentOperands ().size () == 1 ,
4171
- " Must have a type dependent operand for the opened archetype" );
4170
+ require (!AMI->getTypeDependentOperands ().empty (),
4171
+ " Must have at least one type-dependent operand when there's a "
4172
+ " local archetype or dynamic self." );
4172
4173
verifyLocalArchetype (AMI, lookupType);
4173
4174
} else {
4174
4175
require (AMI->getTypeDependentOperands ().empty () || lookupType->hasLocalArchetype (),
Original file line number Diff line number Diff line change
1
+ // RUN: %target-build-swift %s -O -Xfrontend -sil-verify-all
2
+
3
+ protocol PA < I> {
4
+ associatedtype I : P
5
+ func get( ) -> I
6
+ }
7
+
8
+ protocol P {
9
+ var pa : any PA < Self > { get }
10
+ }
11
+
12
+ func f( _ p: any P ) {
13
+ p. pa. get ( )
14
+ }
You can’t perform that action at this time.
0 commit comments