Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0189-rdar49371608.swift
Pavel Yaskevich 8e420496b2 [ConstraintSystem] Delay adding contextual requirements until parent type is opened
`openUnboundGenericType` eagerly tries to add conditional requirements
associated with chain of parents of the given type if type has been
declared inside of constrained extension. But one of the parent types
might be unbound e.g. `A.B` which means it has to be opened, which
by itself, would add such requirements.

Resolves: rdar://problem/49371608
2019-03-28 22:08:33 -07:00

12 lines
179 B
Swift

// RUN: %target-typecheck-verify-swift
struct A<T> {
let foo: [T]
}
extension A : Codable where T: Codable {
enum CodingKeys: String, CodingKey {
case foo = "foo"
}
}