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 268712 - "Unexpected '[' after identifier" with constant array in a namespace
Summary: "Unexpected '[' after identifier" with constant array in a namespace
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal (vote)
Assignee: junichi11
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-27 12:38 UTC by Jack_Brody
Modified: 2016-12-15 12:11 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
8.2 complaining about a constant referenced within a namespace (12.51 KB, image/png)
2016-10-27 12:38 UTC, Jack_Brody
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jack_Brody 2016-10-27 12:38:26 UTC
Created attachment 162658 [details]
8.2 complaining about a constant referenced within a namespace

Syntax checking apparently does not put up with constant arrays in a NAMESPACE. It's the leading backslash what is causing problems.


How to reproduce:


1) create a new PHP 5.6 project, with UTF-8.
2) create a new file "test.php"
3) write: $a = \TEST[0];
4) you get the syntax error in the screenshot




Product Version: NetBeans IDE 8.2 (Build 201609300101)
Java: 1.8.0_101; Java HotSpot(TM) 64-Bit Server VM 25.101-b13
Runtime: Java(TM) SE Runtime Environment 1.8.0_101-b13
System: Windows 7 version 6.1 running on amd64; UTF-8; cs_CZ (nb)
Comment 1 junichi11 2016-11-03 05:51:49 UTC
Thanks for reporting!
Comment 2 junichi11 2016-11-08 01:59:15 UTC
Fixed.

http://hg.netbeans.org/web-main/rev/e6b3338b78ec

Thanks.
Comment 3 junichi11 2016-11-08 02:23:44 UTC
When this fix will be available in the dev build, the comment for it is added here. Then, could you verify it in the dev version?

Thanks.
Comment 4 Tomas Mysik 2016-11-08 09:24:05 UTC
Thanks for the fix, Junichi!
Comment 5 Quality Engineering 2016-11-09 09:02:37 UTC
Integrated into 'main-silver', will be available in build *201611090620* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e6b3338b78ec
User: Junichi Yamamoto <junichi11@netbeans.org>
Log: #268712 - "Unexpected '[' after identifier" with constant array in a namespace
Comment 6 Jack_Brody 2016-11-11 09:09:41 UTC
I have just verified the issue with NetBeans IDE Dev (Build 201611110001) and I can confirm that it has been resolved. Thank you!
Comment 7 Tomas Mysik 2016-11-11 09:24:59 UTC
Thanks for verification!
Comment 8 Tomas Mysik 2016-12-03 14:08:20 UTC
Transplanted to the releases repo branch release82:

http://hg.netbeans.org/releases/rev/f48ff4709324

Thanks.
Comment 9 amobilia 2016-12-15 12:11:47 UTC
82patch1-verified