黑客教程练习16的正确答案是什么?
教程链接:
修改后的代码(未标记为解决方案):
<?hh
// The type 'this' always points to the most derived type
class MyBaseClass {
protected int $count = 0;
public function add1(): this {
$this->count += 1;
return $this;
}
}
class MyDerivedClass extends MyBaseClass {
public