Skip to content

Commit 14f6dbf

Browse files
committed
Add tests suggested by @AnthonyLatsis
1 parent 6cc1212 commit 14f6dbf

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/DebugInfo/parameterized_existential_composition.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// RUN: %target-swift-frontend -emit-ir %s -g -target %target-swift-5.9-abi-triple
22

3+
// Note: The goal of this test is to exercise the mangling/demangling via
4+
// the -g flag.
5+
36
public protocol P<A, B> {
47
associatedtype A
58
associatedtype B
@@ -31,6 +34,17 @@ public func foo(_ a: (any P<Int, Float> & Q<String> & R).Type) {}
3134
public func foo(_ a: (any P<Int, Float> & Q<String> & R & C<Bool>).Type) {}
3235
public func foo(_ a: (any P<Int, Float> & Q<String> & R & AnyObject).Type) {}
3336

37+
public func foo(_ a: (any P & R).Type) {}
38+
public func foo(_ a: (any P & Q<String>).Type) {}
39+
public func foo(_ a: (any P & Q<String> & R).Type) {}
40+
public func foo(_ a: (any P & Q<String> & R & C<Bool>).Type) {}
41+
public func foo(_ a: (any P & Q<String> & R & AnyObject).Type) {}
42+
43+
public func foo(_ a: (any P<Int, Float> & Q).Type) {}
44+
public func foo(_ a: (any P<Int, Float> & Q & R).Type) {}
45+
public func foo(_ a: (any P<Int, Float> & Q & R & C<Bool>).Type) {}
46+
public func foo(_ a: (any P<Int, Float> & Q & R & AnyObject).Type) {}
47+
3448
public struct Foo<each T, U> {
3549
public var a1: (repeat any P<each T, U> & R)
3650
}

0 commit comments

Comments
 (0)