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 - GoToDeclaration and MarkOccurrence don't work when a class is referenced using a variable and "::" is used
Summary: GoToDeclaration and MarkOccurrence don't work when a class is referenced usin...
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
: 267919 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-03-25 05:24 UTC by junichi11
Modified: 2016-09-07 11:37 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 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. ***