Bug #79824 [NEW]: static return type: message and stacktrace wrong for Uncaught TypeError
| From: | si dot schubert at live dot de | Date: | Thu, 09 Jul 2020 19:15:06 +0000 |
| Subject: | Bug #79824 [NEW]: static return type: message and stacktrace wrong for Uncaught TypeError | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-227925@lists.php.net to get a copy of this message | ||
From: si dot schubert at live dot de
Operating system: Debian GNU/Linux 10 (buster)
PHP version: 8.0.0alpha2
Package: *General Issues
Bug Type: Bug
Bug description:static return type: message and stacktrace wrong for Uncaught TypeError
Description:
------------
the message and stack trace references the wrong class
Test script:
---------------
class A
{
public static function new(): static
{
return new self();
}
}
class B extends A
{
}
B::new();
Expected result:
----------------
Fatal error: Uncaught TypeError: B::new(): Return value must be of type
B, A returned in /app/bin/runner:8
Stack trace:
#0 /app/bin/runner(16): B::new()
#1 {main}
thrown in /app/bin/runner on line 8
Actual result:
--------------
Fatal error: Uncaught TypeError: A::new(): Return value must be of type
B, A returned in /app/bin/runner:8
Stack trace:
#0 /app/bin/runner(16): A::new()
#1 {main}
thrown in /app/bin/runner on line 8
--
Edit bug report at https://bugs.php.net/bug.php?id=79824&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79824&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79824&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79824&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79824&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79824&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79824&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79824&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79824&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79824&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79824&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79824&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79824&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79824&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79824&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79824&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79824&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79824&r=mysqlcfg