Files
swift-mirror/test/Serialization/use-class-bound-protocol.swift
Harlan Haskins d23101d337 [Sema] Compute superclass of deserialized protocols via generic signature
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
2019-06-18 16:38:09 -07:00

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()
}