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

Unexpected error occured. enum can't contains StrWhiteSpace name. #1144

Closed
vvakame opened this issue Nov 13, 2014 · 4 comments

Comments

@vvakame
Copy link
Contributor

commented Nov 13, 2014

I think this code is correct. but tsc 1.3.0 and master/HEAD not allowed. Playground

enum Sample {
  '\t', // An enum number cannot have a numeric name.
  ' ', // An enum number cannot have a numeric name.
  '\n', // An enum number cannot have a numeric name.
  '                         ' // An enum number cannot have a numeric name.
}

https://github.com/Microsoft/TypeScript/blame/v1.3/src/compiler/checker.ts#L4094
http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.2.4
http://www.ecma-international.org/ecma-262/5.1/#sec-9.3.1

I think isNumericName check argument is StrNumericLiteral instead of StringNumericLiteral.
I want to make pull request, but I can't come up come up with a fast way...

DefinitelyTyped/DefinitelyTyped#3135

@DanielRosenwasser

This comment has been minimized.

Copy link
Member

commented Nov 13, 2014

Are you sure that you actually tested on master? I've fixed isNumericName since then, and I'm not able to reproduce this.

@vvakame

This comment has been minimized.

Copy link
Contributor Author

commented Nov 13, 2014

oops, I had failed to switching the branch...
did not reproduce in master / HEAD. I'm sorry.
Do not be backport to 1.3.0?

@vvakame vvakame closed this Nov 13, 2014

@DanielRosenwasser

This comment has been minimized.

Copy link
Member

commented Nov 13, 2014

No worries! I'm not actually sure what the branch semantics are at this point. @mhegazy?

@mhegazy

This comment has been minimized.

Copy link

commented Nov 13, 2014

Master is the current development branch. We branch before releases to a branch matching the release name. We use this for stabilization and accept only critical fixes. Once branched we do. It back port all changes, just critical fixes.

So for this issue 1.4 should contain the fix. Is this blocking? Can you use master directly?

@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.