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 214699 - Aliases are wrongly used
Summary: Aliases are wrongly used
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.2
Hardware: All All
: P2 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-25 09:29 UTC by Ondrej Brejla
Modified: 2012-06-27 10:15 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 Ondrej Brejla 2012-06-25 09:29:12 UTC
<?php

namespace Foo\Bar;
class ClassName {}

namespace Fom\Bom;
class ClassName {}

namespace Baz\Bat;
class ClassName {}

namespace Omg;
// try Fix Uses here
$a = new ClassName();
$b = new \Baz\Bat\ClassName();
$b = new \Fom\Bom\ClassName();
?>

Result:

$a = new ClassName3\ClassName();
$b = new ClassName();
$b = new ClassName2\ClassName();

Should be:

$a = new ClassName3();
$b = new ClassName();
$b = new ClassName2();
Comment 1 Ondrej Brejla 2012-06-25 11:29:22 UTC
Fixed in web-main #c29baad07d9d
Comment 2 Ondrej Brejla 2012-06-25 13:59:14 UTC
Probably P2 which should be transplanted into 7.2. Use case from comment #1
breaks users code (it means that it will fail in runtime).

So waiting for QA response.
Comment 3 Vladimir Riha 2012-06-25 14:58:37 UTC
verified in web-main build

I agree with integration into 7.2. Ondro, please follow the HR process and I'll verify it in RC build.

Product Version: NetBeans IDE Dev (Build 20120625-2166f2e72179)
Java: 1.7.0_06-ea; Java HotSpot(TM) Client VM 23.2-b05
System: Linux version 3.0.0-21-generic-pae running on i386; UTF-8; en_US (nb)
Comment 4 Quality Engineering 2012-06-26 04:55:25 UTC
Integrated into 'main-golden', will be available in build *201206260002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/c29baad07d9d
User: Ondrej Brejla <obrejla@netbeans.org>
Log: #214699 - Aliases are wrongly used
Comment 5 Ondrej Brejla 2012-06-26 07:14:56 UTC
Transplanted into 7.2 releases #7b9c82aa4c79

Vlado, please verify, thanks.
Comment 6 Quality Engineering 2012-06-27 03:06:31 UTC
Integrated into 'releases', will be available in build *201206262201* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/7b9c82aa4c79
User: Ondrej Brejla <obrejla@netbeans.org>
Log: #214699 - Aliases are wrongly used
(transplanted from c29baad07d9dacd3654d916f0a674a3a6193704b)
Comment 7 Vladimir Riha 2012-06-27 10:15:33 UTC
verified in 7.2

Product Version: NetBeans IDE 7.2 RC1 (Build 201206262201)
Java: 1.7.0_05; Java HotSpot(TM) Client VM 23.1-b03
System: Linux version 3.0.0-21-generic-pae running on i386; UTF-8; en_US (nb)