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 258527

Summary: GoToDeclaration and MarkOccurrence don't work when a class is referenced using a variable and "::" is used
Product: php Reporter: junichi11
Component: EditorAssignee: Tomas Mysik <tmysik>
Status: NEW ---    
Severity: normal CC: Ninj
Priority: P3    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description junichi11 2016-03-25 05:24:51 UTC
Reproducible code:

<?php

class A {

    const CONSTANT = "CONSTANT";

    public static $staticField = "static field";

    public static function staticMethod() {
        return "staticMethod()";
    }

}

$a = new A();
echo $a::CONSTANT . PHP_EOL; // doesn't work on CONSTANT
echo $a::$staticField . PHP_EOL; // doesn't work on $staticField
echo $a::staticMethod() . PHP_EOL; // doesn't work on staticMethod

A::CONSTANT; // works fine
A::$staticField; // works fine
A::staticMethod(); // works fine

my environment:
Product Version: NetBeans IDE 8.1 (Build 201510222201)
Java: 1.8.0_74; Java HotSpot(TM) 64-Bit Server VM 25.74-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_74-b02
System: Linux version 3.13.0-83-generic running on amd64;

Thanks.
Comment 1 Tomas Mysik 2016-09-07 11:37:49 UTC
*** Bug 267919 has been marked as a duplicate of this bug. ***