-
-
Notifications
You must be signed in to change notification settings - Fork 933
Closed
Labels
C-bugCategory - BugCategory - Bug
Description
babel enum/mix-references/input.ts
In:
var x = 10;
enum Foo {
a = 10,
b = a,
c = b + x,
}Current output:
var x = 10;
var Foo = function(Foo) {
Foo[Foo['a'] = 10] = 'a';
Foo[Foo['b'] = 10] = 'b';
Foo[Foo['c'] = Foo.b + Foo.x] = 'c';
return Foo;
}(Foo || {});
This produces an incorrect transform, Foo.x is undefined producing Foo.c = NaN
We should transform it correctly even we don't compute enum values.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCategory - BugCategory - Bug
Type
Fields
Give feedbackPriority
None yet