Bug #74922 [Opn->Csd]: Composed class has fatal error with duplicate, equal const properties
| From: | nikic@php.net | Date: | Thu, 02 Nov 2017 20:07:01 +0000 |
| Subject: | Bug #74922 [Opn->Csd]: Composed class has fatal error with duplicate, equal const properties | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-212413@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74922&edit=1
ID: 74922
Updated by: nikic@php.net
Reported by: walle dot sthlm at gmail dot com
Summary: Composed class has fatal error with duplicate, equal
const properties
-Status: Open
+Status: Closed
Type: Bug
Package: Class/Object related
Operating System: *
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of mail@pmmaga.net
Revision: http://git.php.net/?p=php-src.git;a=commit;h=897bdb42f084e20eaf8a4b88829fc94f72626fd0
Log: Fix #74922 - Try to resolve constants when importing trait properties
Previous Comments:
------------------------------------------------------------------------
[2017-07-14 05:31:59] walle dot sthlm at gmail dot com
Description:
------------
The following snippet results in the "definition differs and is considered incompatible"
fatal error in 5.6+. Can this be considered as a bug?
const VALUE = true;
trait Foo {public $var = VALUE;}
trait Bar {public $var = VALUE;}
class Baz {use Foo, Bar;}
https://3v4l.org/kkHFe
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74922&edit=1