ID:          43332
 Updated by:  [EMAIL PROTECTED]
 Reported By: felipensp at gmail dot com
-Status:      Open
+Status:      Assigned
 Bug Type:    Scripting Engine problem
 PHP Version: 5.3CVS-2007-11-19 (snap)
-Assigned To: 
+Assigned To: dmitry
 New Comment:

Another namespace issue.


Previous Comments:
------------------------------------------------------------------------

[2007-11-19 11:40:02] felipensp at gmail dot com

Description:
------------
self and parent as type hint in namespace must be prefixed with '::',
but not is possible to use them as class name. So, i'm guessing that
shouldn't be necessary the prefix.

Reproduce code:
---------------
<?php
namespace foobar;

class foo {
  // no namespace
  //public function baz(self $a) { }
  // with namespace
  public function baz(::self $a) { }
}

$foo = new foo;
$foo->baz($foo); // Ok!
//$foo->baz(new stdclass); // Error, ok!

Expected result:
----------------
Don't be necessary prefix in self/parent.

Actual result:
--------------
They must be prefixed.


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


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

Reply via email to