hhvm
hhvm copied to clipboard
Final private method in trait overridden by a child class of the using class is not caught by hh_client
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 https://github.com/facebook/hhvm/issues/8805#issuecomment-845579117