NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Code completion: inherited static inside method (BUG)


Joined: 06 Apr 2007
Posts: 48
Location: Gdansk, POLAND
Reply with quote
It seems more like a bug than a feature request...
phpEd fails to find type of inherited static variable inside the child method... :-/

Code:
<?php
class someClass
{
   function someMethod()
   {
   }
}

class myClass
{
   /**
   * @var someClass
   */
   static $someVar;
}

class myDerived extends myClass
{
   static function otherMethod()
   {
      echo myClass::$someVar->someMethod();
      // Code completion works perfectly here

      echo self::$someVar->|
      // Failed to idenfity type of "myDerived->someVar" property
   }
}

myClass::$someVar->someMethod();
myDerived::$someVar->someMethod();
// Funny, but works here either!
?>


Strange thing is that if I remove (or comment) the "echo self::$someVar->" line, code completion actually finds myDerived::$someVar methods if called from outside the class...
View user's profileFind all posts by NatanielSend private messageVisit poster's website
Code completion: inherited static inside method (BUG)
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic