mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
We don't need to serialize the protocol's superclass, we can compute it from the generic signature. Previously, we would drop the superclass while serializing because we didn't check the generic signature in SuperclassTypeRequest, which would cause us to cache `NULL` when we called `setSuperclass` for a protocol with a superclass constraint. Fixes rdar://50526401
15 lines
378 B
Swift
15 lines
378 B
Swift
// RUN: %empty-directory(%t)
|
|
|
|
// RUN: %target-swift-frontend -emit-module-path %t/ClassBoundProtocol.swiftmodule %S/Inputs/class-bound-protocol.swift -module-name ClassBoundProtocol
|
|
// RUN: %target-swift-frontend -typecheck %s -I %t
|
|
|
|
import ClassBoundProtocol
|
|
|
|
func f() {
|
|
let p: P = C()
|
|
p.funcInClass()
|
|
|
|
let genericP: GenericP = GenericC<Int>()
|
|
genericP.funcInClass()
|
|
}
|