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 270422 - Go to an incorrect declaration in a @method return type
Summary: Go to an incorrect declaration in a @method return type
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Navigation (show other bugs)
Version: Dev
Hardware: All All
: P3 normal (vote)
Assignee: junichi11
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-18 00:37 UTC by junichi11
Modified: 2017-04-21 02:52 UTC (History)
0 users

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 2017-04-18 00:37:15 UTC
Sample code:

<?php

/**
 * @method ParentClass testMethod()
 * @property ParentClass $parent
 */
class ChildClass {
}

class ParentClass {
}

The caret position goes to the method declaration(^testMethod()) when GotoDeclaration is run in the @method return type(Pare^ntClass).

Thanks.
Comment 1 junichi11 2017-04-20 00:23:50 UTC
Fixed.

http://hg.netbeans.org/web-main/rev/88d5d5013aaf

Thanks.
Comment 2 junichi11 2017-04-20 00:33:11 UTC
Remove the buildMagicMethodDeclarationReturnType() because incorrect PhpElements(MethodScopes) are added to the occurrences in it, and types are added to them in the buildDocTagsForClasses().Related to #171249.
Comment 3 Quality Engineering 2017-04-21 02:52:41 UTC
Integrated into 'main-silver', will be available in build *201704210002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/88d5d5013aaf
User: Junichi Yamamoto <junichi11@netbeans.org>
Log: #270422 - Go to an incorrect declaration in a @method return type

Remove the buildMagicMethodDeclarationReturnType() because incorrect PhpElements(MethodScopes) are added to the occurrences in it, and types are added to them in the buildDocTagsForClasses().
Related to #171249.