Skip to content

Commit 0ec17d1

Browse files
author
John Messerly
committed
Fixes #586 - enums should now work in SDK libs
R=jacobr@google.com Review URL: https://codereview.chromium.org/2045783002 .
1 parent aea2fa1 commit 0ec17d1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/dev_compiler/lib/src/compiler/code_generator.dart

+4
Original file line numberDiff line numberDiff line change
@@ -1053,6 +1053,10 @@ class CodeGenerator extends GeneralizingAstVisitor
10531053
// Create static values list
10541054
var values = new JS.ArrayInitializer(new List<JS.Expression>.from(
10551055
fields.map((f) => js.call('#.#', [id, f.name]))));
1056+
1057+
// dart.constList helper internally depends on _interceptors.JSArray.
1058+
_declareBeforeUse(_jsArray);
1059+
10561060
result.add(js.statement(
10571061
'#.values = dart.constList(#, #);', [id, values, _emitType(type)]));
10581062

0 commit comments

Comments
 (0)