hylo
hylo copied to clipboard
Name resolution in generic arguments list fails in extensions
Reproducer:
type A<X> {
public memberwise init
}
typealias B<Y> = A<Y>
trait T {}
conformance B: T {
public fun h() {
let p = self
check<A<Y>>(p) // <- fails
}
}
fun check<T>(_ x: T) {}
The type checker incorrectly opens Y
as a fresh variable in A<Y>
. Name resolution should conclude that Y
has to be skolemized, as its use occurs in a scope bridged to A
's declaration.