You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
new, instanceof and static calls through a name created by class_alias() at run time do not resolve: Class "B" not found. #653
new, instanceof and static calls through a name created by class_alias() at run time do not resolve: Class "B" not found.
Repro
<?phpclass A { publicstaticfunctionwho(): string { returnstatic::class; } }
class_alias("A", "B");
$b = newB();
var_dump($binstanceof A, $binstanceof B, B::who(), get_class($b));
Expected (php)
bool(true)
bool(true)
string(1) "A"
string(1) "A"
Actual (manticore da108790, Darwin arm64)
compile failed (rc=65):
tests/aot/repro/wrong/class_alias_runtime_new.php:6: error[undefined.class]: class B is not declared (reachable: __main)
front end: 1 error(s), 0 warning(s)
compile: front-end (parse/typeck/IR) returned null (rc=65)
Tracking
Known-bug repro: tests/aot/repro/wrong/class_alias_runtime_new.php — bash tests/aot/xfail.sh -k class_alias_runtime_new reports XFAIL while this is open and XPASS once it is fixed; then move the repro into tests/aot/cases/ and close this issue.
Activity
Issue sweep: 31 bugs across front end, coercion, calls and class reso…