Skip to content

Bound methods with non-identifier names cause a crash #858

@alangpierce

Description

@alangpierce

decaffeinate is crashing on my CoffeeScript input:

class A
  "#{b}": => c

(repl)

I get this error:

AddVariableDeclarationsStage failed to parse: Unexpected token (3:9)
  1 | class A {
  2 |   constructor() {
> 3 |     this."#{b}" = this."#{b}".bind(this);
    |          ^
  4 |   }
  5 | 

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions