File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -234,14 +234,6 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
234
234
// TODO: We should compare generic signatures. Class and witness methods
235
235
// allow variance in "self"-fulfilled parameters; other functions must
236
236
// match exactly.
237
- auto signature1 = type1->getGenericSignature ();
238
- auto signature2 = type2->getGenericSignature ();
239
-
240
- auto getAnyOptionalObjectTypeInContext = [&](CanGenericSignature sig,
241
- SILType type) {
242
- Lowering::GenericContextScope context (F.getModule ().Types , sig);
243
- return type.getAnyOptionalObjectType ();
244
- };
245
237
246
238
// TODO: More sophisticated param and return ABI compatibility rules could
247
239
// diverge.
@@ -295,8 +287,8 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
295
287
continue ;
296
288
297
289
// Optional and IUO are interchangeable if their elements are.
298
- auto aObject = getAnyOptionalObjectTypeInContext (signature1, aa );
299
- auto bObject = getAnyOptionalObjectTypeInContext (signature2, bb );
290
+ auto aObject = aa. getAnyOptionalObjectType ( );
291
+ auto bObject = bb. getAnyOptionalObjectType ( );
300
292
if (aObject && bObject
301
293
&& areABICompatibleParamsOrReturns (aObject, bObject))
302
294
continue ;
You can’t perform that action at this time.
0 commit comments