Edit report at http://bugs.php.net/bug.php?id=54624&edit=1

 ID:                 54624
 Updated by:         fel...@php.net
 Reported by:        david at grudl dot com
-Summary:            class_alias and type hint (II.)
+Summary:            class_alias and type hint
-Status:             Open
+Status:             Closed
 Type:               Bug
-Package:            Compile Failure
+Package:            Scripting Engine problem
 PHP Version:        5.3.6
-Assigned To:        
+Assigned To:        felipe
 Block user comment: N
 Private report:     N

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------
[2011-06-12 23:10:34] fel...@php.net

Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&revision=312112
Log: - Fixed bug #54624 (class_alias and type hint)

------------------------------------------------------------------------
[2011-04-28 17:11:02] david at grudl dot com

Description:
------------
class_alias() is not taken into account by type hints.



Note: there is eval(), so this is NOT PARSING-TIME error. Alias was created 
before eval is parsed.

Test script:
---------------
<?php



class A

{

        function foo(A $param) {

        }



}



class_alias('A', 'AliasA');



eval(' 

        class B extends A

        {

                function foo(AliasA $param) {

                }



        }

');

Expected result:
----------------
no error

Actual result:
--------------
Strict Standards: Declaration of B::foo() should be compatible with that of 
A::foo() 


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



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

Reply via email to