Skip to content

Named expression-style classes should assign that name to their scope #867

Description

@alangpierce

decaffeinate is producing the wrong JavaScript based on my CoffeeScript input:

A = class B
console.log(B)

(repl)

I get this output:

const A = class B {};
console.log(B);

Here's what I expect it to be instead:

let B;
const A = B = class B {};
console.log(B);

This is causing the atom tests to fail after decaffeinate.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions