In the nightly compiler, the following code which exercises swift-evolution/0299-extend-generic-static-member-lookup.md at main · apple/swift-evolution · GitHub doesn't work:
protocol Foo { }
struct Bar: Foo { }
extension Foo where Self == Bar {
static func bar(_ foo: Foo) -> Self { fatalError() }
static var baz: Self { fatalError() }
}
func foo() {
let _: Foo = .baz // Works
let _: Foo = .bar(Bar.baz) // Works
let _: Foo = .bar(.baz) // "Type of expression is ambiguous without more context"
}
Is this is a bug, a limitation of the current implementation, or something that explicitly won't be supported? @xedin