@@ -170,16 +170,31 @@ func testEnum(_ e: E) {
170170// CHECK: sil @$s17has_symbol_helper1EO6methodyyF : $@convention(method) (@in_guaranteed E) -> ()
171171
172172
173- // CHECK: sil hidden [ossa] @$s4test0A8Protocolyyx17has_symbol_helper1PRzlF : $@convention(thin) <T where T : P> (@in_guaranteed T) -> ()
174- func testProtocol < T: P > ( _ p: T ) {
173+ // CHECK: sil hidden [ossa] @$s4test0A15OpaqueParameteryyx17has_symbol_helper1PRzlF : $@convention(thin) <T where T : P> (@in_guaranteed T) -> ()
174+ func testOpaqueParameter < T: P > ( _ p: T ) {
175175 // CHECK: [[RES:%[0-9]+]] = has_symbol #P.requirement
176176 // CHECK: cond_br [[RES]], bb{{[0-9]+}}, bb{{[0-9]+}}
177177 if #_hasSymbol( p. requirement) { }
178+ // CHECK: [[RES:%[0-9]+]] = has_symbol #P.requirementWithDefaultImpl
179+ // CHECK: cond_br [[RES]], bb{{[0-9]+}}, bb{{[0-9]+}}
180+ if #_hasSymbol( p. requirementWithDefaultImpl) { }
178181}
179182
180183// --- P.requirement() ---
181184// CHECK: sil @$s17has_symbol_helper1PP11requirementyyF : $@convention(witness_method: P) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> ()
182185
186+ // --- P.requirementWithDefaultImpl() ---
187+ // CHECK: sil @$s17has_symbol_helper1PP26requirementWithDefaultImplyyF : $@convention(witness_method: P) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> ()
188+
189+ // CHECK: sil hidden [ossa] @$s4test0A20ExistentialParameteryy17has_symbol_helper1P_pF : $@convention(thin) (@in_guaranteed any P) -> ()
190+ func testExistentialParameter( _ p: any P ) {
191+ // CHECK: [[RES:%[0-9]+]] = has_symbol #P.requirement
192+ // CHECK: cond_br [[RES]], bb{{[0-9]+}}, bb{{[0-9]+}}
193+ if #_hasSymbol( p. requirement) { }
194+ // CHECK: [[RES:%[0-9]+]] = has_symbol #P.requirementWithDefaultImpl
195+ // CHECK: cond_br [[RES]], bb{{[0-9]+}}, bb{{[0-9]+}}
196+ if #_hasSymbol( p. requirementWithDefaultImpl) { }
197+ }
183198
184199// CHECK: sil hidden [ossa] @$s4test0A9MetatypesyyF : $@convention(thin) () -> ()
185200func testMetatypes( ) {
0 commit comments