Uploaded image for project: 'Aptana Studio'
  1. Aptana Studio
  2. APSTUD-8212

"Go to declaration" confused by php class properties and methods of the same name.

    Details

    • Type: Bug
    • Status: Open
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: Aptana Studio 3.4.2
    • Fix Version/s: None
    • Component/s: Editor
    • Labels:
    • Environment:

      CentOS 6.5, Eclipse Kepler

      Description

      To reproduce, using the Aptana plugin and this code, try going to the declaration for "$this->something".

      <?php
       
      function globalFn() {
          echo "running globalFn\n";
      }
       
      class somethingBroken {
          public $something = 'globalFn';
          function something() {
              echo "running something\n";
          }
          function fnThatBreaksSomething() {
              // this line is broken
              $this->something(); // prints "running something"
              // real functions supersede variable functions
              // in order to print "running globalFn" you would have to do this
              $fn = $this->something;
              $fn();
          }
      

      CTRL+Click and F3 don't work on "$this->something" though oddly enough, clicking on the parenthesis takes you to the class property. My guess is that some logic is broken related to being uncertain about whether "$this->something()" would run globalFn() or a::something().

        Attachments

          Activity

            People

            • Assignee:
              ingo Ingo Muschenetz
              Reporter:
              thatthatisis Brandon Detty
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Git Integration