Skip to content

Unhandled Error for using "enum" as a parameter #46433

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

Closed
pushkine opened this issue Oct 19, 2021 · 0 comments Β· Fixed by #46459
Closed

Unhandled Error for using "enum" as a parameter #46433

pushkine opened this issue Oct 19, 2021 · 0 comments Β· Fixed by #46459
Labels
Bug A bug in TypeScript Domain: Error Messages The issue relates to error messaging Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". Help Wanted You can do this
Milestone

Comments

@pushkine
Copy link
Contributor

Bug Report

πŸ•— Version & Regression Information

ts stable & nightly

⏯ Playground Link

Playground Link

πŸ’» Code

export function foo(enum) {
	return enum;
}

πŸ™ Actual behavior

function foo(enum) {
             ^^^^^ Error: Identifier expected. (1003)
	return enum;
               ^^^^^ Error: Expression expected. (1109)

πŸ™‚ Expected behavior

function foo(enum) {
             ^^^^ Error: Identifier expected. 'enum' is a reserved word that cannot be used here. (1359)
@andrewbranch andrewbranch added Bug A bug in TypeScript Domain: Error Messages The issue relates to error messaging Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". Help Wanted You can do this labels Oct 20, 2021
@andrewbranch andrewbranch added this to the Backlog milestone Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Error Messages The issue relates to error messaging Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". Help Wanted You can do this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants