mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
15 lines
274 B
Swift
15 lines
274 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
// https://github.com/apple/swift/issues/47827
|
|
|
|
protocol P {}
|
|
class Helper {}
|
|
|
|
class Base {}
|
|
class Sub<T>: Base {}
|
|
|
|
// The superclass constraint was the culprit.
|
|
func foo<T: Helper & P>(base: Base, arg: T) {
|
|
_ = base as? Sub<T>
|
|
}
|