Files
swift-mirror/test/IDE/complete_rdar126168123.swift
2024-06-08 11:50:19 +01:00

22 lines
439 B
Swift

// RUN: %batch-code-completion
// rdar://126168123
protocol MyProto {}
protocol MyProto2 {}
struct MyStruct : MyProto {}
extension MyProto where Self == MyStruct {
static var automatic: MyStruct { fatalError() }
}
func use<T: MyProto>(_ someT: T) {}
func use<T: MyProto2>(_ someT: T) {}
func test() {
use(.#^COMPLETE^#)
}
// COMPLETE: Decl[StaticVar]/CurrNominal/TypeRelation[Convertible]: automatic[#MyStruct#]; name=automatic