Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326842 - [validation] Use of javascript const gives "missing semicolon" in associative arrays
Summary: [validation] Use of javascript const gives "missing semicolon" in associative...
Status: NEW
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal with 1 vote (vote)
Target Milestone: Future   Edit
Assignee: Project Inbox CLA
QA Contact: Chris Jaun CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-02 09:18 EDT by Daniel Skovenborg CLA
Modified: 2013-06-19 11:10 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Skovenborg CLA 2010-10-02 09:18:00 EDT
Build Identifier: 20100218-1602

If a javascript file declares a const and an associative array is declared inside a function that declares a local variable, the javascript validator gives a "missing semicolon" warning on the associative array.

Reproducible: Always

Steps to Reproduce:
1. Create a javascript source file with the following code:
const c = 0;

function f() {
	var v;
	a = {
		k: 0
	};
}
2. The validator now gives a "missing semicolon" warning on the "k: 0" line.
Comment 1 Lin ZuXiong CLA 2012-02-06 00:30:21 EST
One way to ignore the annoying errors is that :
1.remove javascript -> validator -> errors/warning.
2.remove project -> .project file -> javascript command
3.It is important,too! delete js file and import again.
Comment 2 Justin Early CLA 2013-01-30 12:04:27 EST
I am not able to reproduce this error with VJET JS IDE[1]

[1] http://eclipse.org/vjet