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 147185 - Type resolution of goto declaration is very simple (just new WhateverObject)
Summary: Type resolution of goto declaration is very simple (just new WhateverObject)
Status: RESOLVED DUPLICATE of bug 143426
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: rmatous
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-13 21:52 UTC by Petr Pisl
Modified: 2008-09-23 14:55 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 Petr Pisl 2008-09-13 21:52:00 UTC
Have a code:

<?php

class Country {
    public $name;
    public $code;
}

class Address {
    public $street;
    public $city;
    /**
     *
     * @var Country
     */
    public $country;
}

class Person {
    /**
     * 
     * @var Address
     */
    private $address;

    function getCity() {
        $this->address->city;
        $this->address->country->name;
    }
}
?>

Try to navigate through hyperlink into declaration of city or name in the getCity method.
Comment 1 rmatous 2008-09-15 07:55:19 UTC
Type resolution of goto declaration is very simple (just new WhateverObject).
Doesn't work:
- phpdoc not taken into account 
- methods chains generally 
- common assignments $a = new WhateverObject; $b = $a; 
- more advanced assignments like: $a = $b = $c = new new WhateverObject;
- in catch block is known type catch (MyException exc)
- instanceof block if ($v instanceof MyObject)

As a result goto declaration doesn't work properly.

Deserves a couple of days of coding, almost all this behavior was added already into CC (approximately during last 3 weeks)
Comment 2 rmatous 2008-09-23 14:55:49 UTC
Marking as duplicate of #143426

*** This issue has been marked as a duplicate of 143426 ***