File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
validation-test/compiler_crashers_2_fixed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -3163,7 +3163,7 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
3163
3163
" requirement Self parameter must conform to called protocol" );
3164
3164
3165
3165
auto lookupType = AMI->getLookupType ();
3166
- if (getOpenedArchetypeOf (lookupType) || isa<DynamicSelfType>(lookupType )) {
3166
+ if (getOpenedArchetypeOf (lookupType) || lookupType-> hasDynamicSelfType ( )) {
3167
3167
require (AMI->getTypeDependentOperands ().size () == 1 ,
3168
3168
" Must have a type dependent operand for the opened archetype" );
3169
3169
verifyOpenedArchetype (AMI, lookupType);
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend -emit-sil %s
2
+
3
+ public class C {
4
+ public func foo( ) -> Self {
5
+ let arr = [ self ]
6
+
7
+ bar ( arr)
8
+
9
+ return self
10
+ }
11
+ }
12
+
13
+ @_transparent public func bar< T : Sequence > ( _ xs: T ) {
14
+ for x in xs { _ = x }
15
+ }
You can’t perform that action at this time.
0 commit comments