Skip to content

Commit 7b4f4e0

Browse files
authored
Merge pull request #27431 from AnthonyLatsis/sr-5252-test
[NFC] Add a regression test for SR-5252
2 parents 3571b1d + 6260b45 commit 7b4f4e0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/Constraints/sr5252.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// RUN: %target-typecheck-verify-swift
2+
3+
protocol P {}
4+
class Helper {}
5+
6+
class Base {}
7+
class Sub<T>: Base {}
8+
9+
// The superclass constraint was the culprit.
10+
func foo<T: Helper & P>(base: Base, arg: T) {
11+
_ = base as? Sub<T>
12+
}

0 commit comments

Comments
 (0)