Skip to content

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

Closed
@pushkine

Description

@pushkine

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: Error MessagesThe issue relates to error messagingEffort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Help WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions