php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #69774 unnecessary disambiguation request in traits
Submitted: 2015-06-08 16:57 UTC Modified: 2015-06-09 14:13 UTC
From: youwish dot spambot at example dot org Assigned: cmb (profile)
Status: Duplicate Package: *General Issues
PHP Version: master-Git-2015-06-08 (Git) OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: youwish dot spambot at example dot org
New email:
PHP Version: OS:

 

 [2015-06-08 16:57 UTC] youwish dot spambot at example dot org
Description:
------------
trait A { function sigh(){} }
trait B{ use A; }
trait C{ use A; }
class GAWD{
    use B;
    use C;
}

Fatal error: Trait method sigh has not been applied, because there are collisions with other trait methods on GAWD in...


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-08 18:03 UTC] cmb@php.net
-Type: Bug +Type: Feature/Change Request
 [2015-06-08 18:03 UTC] cmb@php.net
It is documented[1]:

| If two Traits insert a method with the same name, a fatal error
| is produced, if the conflict is not explicitly resolved.

Therefore this is not a bug – I'm changing to feature request.

[1] <http://php.net/manual/en/language.oop5.traits.php#language.oop5.traits.conflict>
 [2015-06-09 14:13 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2015-06-09 14:13 UTC] cmb@php.net
Well, actually this is a duplicate of bug #63911.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 13:01:29 2024 UTC