Req #69774 [Opn->Dup]: unnecessary disambiguation request in traits

From: Date: Tue, 09 Jun 2015 14:13:33 +0000
Subject: Req #69774 [Opn->Dup]: unnecessary disambiguation request in traits
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-193244@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69774&edit=1

 ID:                 69774
 Updated by:         cmb@php.net
 Reported by:        youwish dot spambot at example dot org
 Summary:            unnecessary disambiguation request in traits
-Status:             Open
+Status:             Duplicate
 Type:               Feature/Change Request
 Package:            *General Issues
 PHP Version:        master-Git-2015-06-08 (Git)
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

Well, actually this is a duplicate of bug #63911.


Previous Comments:
------------------------------------------------------------------------
[2015-06-08 18:03:49] 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-08 16:57:47] 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...



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=69774&edit=1


Thread (3 messages)

« previous php.bugs (#193244) next »