| Index: sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart b/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
|
| index 9507f3e420a1eab579778c8bcddcb86d481f1680..7e2fdb1e74b592318277fa246dc0f083ecfb0f9e 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
|
| @@ -679,6 +679,12 @@ class CodeEmitterTask extends CompilerTask {
|
| // marking the function as invokable by reflection.
|
| return '$name=';
|
| }
|
| + if (elementOrSelector is Element && elementOrSelector.isClosure()) {
|
| + // Closures are synthesized and their name might conflict with existing
|
| + // globals. Assign an illegal name, and make sure they don't clash
|
| + // with each other.
|
| + return " $mangledName";
|
| + }
|
| if (elementOrSelector is Selector
|
| || elementOrSelector.isFunction()
|
| || elementOrSelector.isConstructor()) {
|
|
|