Closed Bug 271678 Opened 20 years ago Closed 20 years ago

javascript parser error

Categories

(Core :: JavaScript Engine, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: surkov, Unassigned)

Details

Attachments

(1 file)

363 bytes, application/vnd.mozilla.xul+xml
Details
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616

When I try to use undeclared variable then I get exception. It's right. When I
try to use undeclared variable but it will be declared later then I get that
this variable is undefined.

Reproducible: Always
Steps to Reproduce:
try{
	alert(DCTOOLKIT_JS);
} catch(e){
	alert(e);
	var DCTOOLKIT_JS=1;//you can var keyword replace on const keyword.
}
Actual Results:  
I should get exception.

Expected Results:  
I get that variable is undefined.
Attached file testcase
Please don't file INVALID bugs -- instead, study ECMA-262 (Edition 3 is
available at http://www.mozilla.org/js/language/E262-3.pdf among other places)
to see why this bug is invalid.  Section 10 in particular is important.

/be
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: