Incorrect 'undefined' mark

PS 102.206 EAP

Seems like a bug, look at this example:

class A
{
  protected $p;

  protected function myFunc($a,$b){
    
    //$this;$a;
    if (1 && 2) {
      $n=$this->p+$a;
    }
  }
}


$this and $a will be marked as undefined, which is incorrect ofcourse.

But if we uncomment the line wich, just mentions variables above, the mark will disapear.

Tthe mark will also disapear if we'll use simple conditions in if clause:

 if(1) 

instead of

if (1 && 2)
2 comments
Comment actions Permalink

Yep, these are known issues in current build. They (JB devs) have coded brand new inspection engine which was not polished well enough (well, it is an EAP build at the end of the day). But most of the reported issues are already fixed and next build should be much better in this respect.

0
Comment actions Permalink

Hello Dmitry,

The latest EAP have a problem with short-circuit operators like '&&'. The problem is already fixed. Thanks for detailed report anyway!

0

Please sign in to leave a comment.