This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 270973 - when name of static method of class has prefix of like 'class2', syntax check is failure at it be invoked code
Summary: when name of static method of class has prefix of like 'class2', syntax chec...
Status: RESOLVED WORKSFORME
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal (vote)
Assignee: junichi11
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-27 07:24 UTC by szopen
Modified: 2017-06-28 02:17 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description szopen 2017-06-27 07:24:51 UTC
when name of static method of class start with 'class' and number, syntax check is failure at the method be invoked code

example, the below code is correct code in php:

class A {
    const class1const = 1; //is correct

    public static function class2test() { //is correct
        echo 'test';
    }
    public function class2test2() {
        self::class1const;  //has syntax error message
        self::class2test(); //has syntax error message
    }

    public static function t2class2test2() {
    }
}

$a = new A();
$a->class2test2(); //is correct
A::class1const; //has syntax error message
A::class2test(); //has syntax error message
A::t2class2test(); //is correct
Comment 1 junichi11 2017-06-28 02:17:42 UTC
Thanks for reporting!

Probably, this was fixed with Context Sensitive Lexer support. So please try to use a  dev build [1].

[1] http://bits.netbeans.org/download/trunk/nightly/latest/