mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This was manifesting as module interfaces printing generic parameters as `τ_0_0` in some cases. Note that the GSB has the same bug, so this test case will fail with -requirement-machine=off. I don't plan on fixing the bug in the GSB unless we need to. Fixes rdar://problem/78977127.
26 lines
1019 B
Swift
26 lines
1019 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-build-swift -emit-module -o %t/Test.swiftmodule -emit-module-interface-path %t/Test.swiftinterface -module-name Test -enable-library-evolution -swift-version 5 %s
|
|
// RUN: %FileCheck %s < %t/Test.swiftinterface
|
|
|
|
public protocol P {
|
|
}
|
|
|
|
public class Foo<T> : P {
|
|
public struct Nested {}
|
|
}
|
|
|
|
extension P {
|
|
public static func blah1<T>(_: Self) where Self == Foo<T> {}
|
|
public static func blah2<T>(_: Self.Nested) where Self == Foo<T> {}
|
|
|
|
public static func blah3<T>(_: Self) where Self : Foo<T> {}
|
|
public static func blah4<T>(_: Self.Nested) where Self : Foo<T> {}
|
|
}
|
|
|
|
// CHECK-LABEL: extension Test.P {
|
|
// CHECK-NEXT: public static func blah1<T>(_: Self) where Self == Test.Foo<T>
|
|
// CHECK-NEXT: public static func blah2<T>(_: Test.Foo<T>.Nested) where Self == Test.Foo<T>
|
|
// CHECK-NEXT: public static func blah3<T>(_: Self) where Self : Test.Foo<T>
|
|
// CHECK-NEXT: public static func blah4<T>(_: Test.Foo<T>.Nested) where Self : Test.Foo<T>
|
|
// CHECK-NEXT: }
|