Files
swift-mirror/test/Generics/rdar76750100.swift
Slava Pestov 3296032f19 GSB: When rebuilding a signature, drop layout requirements implied by concrete as well
Otherwise, when we resolve the subject type while adding the requirement
to the new signature, we assert that it is not a dependent type.

This fixes a regression from 977d3a77cf.

Fixes rdar://problem/76750100.
2021-04-19 22:55:01 -04:00

15 lines
479 B
Swift

// RUN: %target-typecheck-verify-swift -disable-objc-attr-requires-foundation-module -enable-objc-interop
// RUN: %target-swift-frontend -disable-objc-attr-requires-foundation-module -debug-generic-signatures -enable-objc-interop -typecheck %s 2>&1 | %FileCheck %s
@objc protocol P1 {}
@objc protocol P2 : P1 {}
class G<X : P1, Y : AnyObject> {}
class C {}
// CHECK-LABEL: Generic signature: <X, Y where X == P2, Y == C>
extension G where X == P2, Y == C {
func foo() {}
}