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

Should forbid static property named 'name' #6946

Closed
JMS-1 opened this issue Feb 6, 2016 · 2 comments
Closed

Should forbid static property named 'name' #6946

JMS-1 opened this issue Feb 6, 2016 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@JMS-1
Copy link

JMS-1 commented Feb 6, 2016

class Test { static name = "what"; } will report "what" for Test.name in IE11 but "Test" in FF and Chrome. This seems to be by design (https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Function/name). Either the use of 'name' should be not allowed at all or the compiler should do some name mangling - although according to the specs the first option seems to be more appropriate.

@JMS-1 JMS-1 changed the title Should forbid static property named Should forbid static property named 'name' Feb 6, 2016
@basarat
Copy link
Contributor

basarat commented Feb 8, 2016

Duplicate of #442 (comment)

@JMS-1
Copy link
Author

JMS-1 commented Feb 8, 2016

Sorry - did't go back that far when looking it up.

@JMS-1 JMS-1 closed this as completed Feb 8, 2016
@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Feb 8, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants