mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Since original implicit coercion expression is preserved in AST it needs to have its simplified type cached in the constraint system in order for AST to get the correct type when solution is fully applied. Resolves: rdar://problem/45415874
16 lines
252 B
Swift
16 lines
252 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
final class A<T> {
|
|
init(_: T) {}
|
|
}
|
|
|
|
extension A: ExpressibleByNilLiteral where T: ExpressibleByNilLiteral {
|
|
convenience init(nilLiteral: ()) {
|
|
self.init(nil)
|
|
}
|
|
}
|
|
|
|
struct B {
|
|
var foo: A<B?> = A(nil)
|
|
}
|