// @flow
class A {
f(x: any, ...args: any[]) {}
}
class B extends A {
f(x, ...args) {
if (x.y) {
this.f(x.y, ...args);
}
}
}
Type checking never terminates.
Dupe of #3370?
cc @gabelevi
Yep, and much like I pointed out in #3370, if you declare the rest arg types on B.prototype.f, the problem goes away:
class B extends A {
f(x, ...args: any[]) {
if (x.y) {
this.f(x.y, ...args);
}
}
}
Ok, I have a fix! I'll try to get it reviewed and cherry picked into v0.42!
Most helpful comment
Ok, I have a fix! I'll try to get it reviewed and cherry picked into v0.42!