Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dart2js: Do not use 'super' as property name in object literals #4592

Closed
DartBot opened this issue Aug 19, 2012 · 2 comments
Closed

dart2js: Do not use 'super' as property name in object literals #4592

DartBot opened this issue Aug 19, 2012 · 2 comments
Labels
closed-duplicate Closed in favor of an existing report web-dart2js

Comments

@DartBot
Copy link

DartBot commented Aug 19, 2012

This issue was originally filed by @bgourlie


'super' is a keyword reserved for future use per https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Reserved_Words

See https://groups.google.com/a/dartlang.org/forum/?fromgroups#!topic/misc/wVQ6Mi1dWtU%5B1-25%5D for discussion.

@rakudrama
Copy link
Member

At the bottom of the linked page it says:

"Reserved word usage

Reserved Words actually only apply to Identifiers (vs. IdentifierNames) . As described in es5.github.com/#A.1, these are all IdentifierNames which do not exclude ReservedWords.

a.import
a["import"]
a = { import: "test" }.

"

The use of 'super' as a PropertyName is permitted, just like 'import' in the last example above.

I think it is only IE8 and earlier that has trouble with 'super' in our generated code. There are many other problems with IE8, which is why we looking at IE9 and forwards.

Given that there are many other reasons the program is not going to work on IE8, it makes sense to leave this as is.
Everyone gets the same symptom of trying to run on IE8.
If we 'fix' this programs running on IE8 will exhibit a much wider range of issues, some of them very time consuming to analyse.

It is possible that the user is using IE9 but in some back-compatability mode. In that case, the html should explicity specify the documenat compatibility mode ( http://msdn.microsoft.com/en-us/library/ie/cc288325(v=vs.85).aspx )


Added Area-Dart2JS, WontFix labels.

@floitschG
Copy link
Contributor

Marking as duplicate of issue #4759.
I'm about to put quotes around the 'super' identifier so it works on Android. Stephen is right that this will reveal other bugs in IE8 that we might not be willing to fix.


Added Duplicate label.
Marked as being merged into #4759.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report web-dart2js
Projects
None yet
Development

No branches or pull requests

3 participants