-
Bug
-
Resolution: Fixed
-
P3
-
8u60, 9
-
None
-
b54
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085602 | emb-9 | Hannes Wallnoefer | P3 | Resolved | Fixed | team |
JDK-8087035 | 8u65 | Hannes Wallnoefer | P3 | Resolved | Fixed | b01 |
JDK-8074086 | 8u60 | Hannes Wallnoefer | P3 | Resolved | Fixed | b06 |
JDK-8138454 | emb-8u65 | Unassigned | P3 | Resolved | Fixed | b01 |
JDK-8076949 | emb-8u60 | Hannes Wallnoefer | P3 | Resolved | Fixed | team |
const x = 1;
print("hello world");
x = 3;
Should the output "hello world" be seen or not? Right now, nashorn treats this as "early error".
But, see this:
https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-11/nov-18.md#43-assignment-to-a-const-static-error
http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts
Has these lines
/ Assigning to a const declared binding throw, even in non-strict mode code.
Eliminated requirement to statically find and report assign to const declared names./
under section "December 6, 2014 Draft Rev 29"
So, it appears that the (as of now!) const re-assignment is reported as TypeError - but not an early error.
print("hello world");
x = 3;
Should the output "hello world" be seen or not? Right now, nashorn treats this as "early error".
But, see this:
https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-11/nov-18.md#43-assignment-to-a-const-static-error
http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts
Has these lines
/ Assigning to a const declared binding throw, even in non-strict mode code.
Eliminated requirement to statically find and report assign to const declared names./
under section "December 6, 2014 Draft Rev 29"
So, it appears that the (as of now!) const re-assignment is reported as TypeError - but not an early error.
- backported by
-
JDK-8074086 const re-assignment should not reported as a "early error"
-
- Resolved
-
-
JDK-8076949 const re-assignment should not reported as a "early error"
-
- Resolved
-
-
JDK-8085602 const re-assignment should not reported as a "early error"
-
- Resolved
-
-
JDK-8087035 const re-assignment should not reported as a "early error"
-
- Resolved
-
-
JDK-8138454 const re-assignment should not reported as a "early error"
-
- Resolved
-