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 240523

Summary: Autocomplete after instanceof does not work in other namespace without use
Product: php Reporter: sectus
Component: EditorAssignee: Ondrej Brejla <obrejla>
Status: VERIFIED FIXED    
Severity: normal CC: sectus
Priority: P3    
Version: 7.4   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description sectus 2014-01-16 02:43:56 UTC
namespace Name\Space
    {
    class SomeClass
        {
        public function autocomplete(){}
        }

    $object = $this->getObject()->getOtherObject();
    assert($object instanceof SomeClass);
    $object->autocomplete(); // works
    }

namespace Other\Name\Space
    {
    $object = $this->getObject()->getOtherObject();
    assert($object instanceof \Name\Space\SomeClass);
    $object->autocomplete(); // not works
    }

namespace More\Name\Space
    {
    use Name\Space\SomeClass;

    $object1 = $this->getObject()->getOtherObject();
    assert($object1 instanceof \Name\Space\SomeClass);
    $object1->autocomplete(); // works

    $object2 = $this->getObject()->getOtherObject();
    assert($object2 instanceof SomeClass);
    $object2->autocomplete(); // works
    }
Comment 1 Ondrej Brejla 2014-01-20 10:48:03 UTC
Fixed in web-main #ffefae4f25e8
Comment 2 Quality Engineering 2014-01-21 02:57:24 UTC
Integrated into 'main-silver', will be available in build *201401210001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/ffefae4f25e8
User: Ondrej Brejla <obrejla@netbeans.org>
Log: #240523 - Autocomplete after instanceof does not work in other namespace without use
Comment 3 mmolda 2014-01-30 17:12:55 UTC
Verified.

Product Version: NetBeans IDE Dev (Build 201401300001)
Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b67
Runtime: Java(TM) SE Runtime Environment 1.8.0-b126
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)