After doing some work on this, I kinda think we should ban it on traits too. If we only ban final private methods on classes, hh will still accept this code that HHVM rejects:
trait MyTrait {
public function foo(): void { $this->bar(); }
final private function bar(): void {}
}
class MyClass {
use MyTrait;
}
class MyChild extends MyClass {
private function bar(): void {}
}
@lexidor do you have any opinions here?
Originally posted by @Wilfred in #8805 (comment)