facebook / facebook/hhvm

Incorrect LSB for __Memoize on static functions

未關閉
#4,962 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
hack probably easy
主要語言
C++
星號
18.7k
分支
3.1k
平均合併
1 小時 47 分鐘
30 天內合併 PR
2

描述

``` Hack
>
protected static function doStuff() {
var_dump(static::class);
}
}

class B extends A {
public static function doOtherStuff() {
self::doStuff();
}
}

B::doOtherStuff();
```

Actual output: A
Expected output: B

From bytecode:

```
55: FPushClsMethodD 0 "doStuff$memoize_impl" "A"
```

This should be FPushClsMethodF.

The user still needs to be careful about the shared cache between the superclass and child class

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。