Index: test/codegen/closure.dart |
diff --git a/test/codegen/closure.dart b/test/codegen/closure.dart |
index d40e8a759476cb00dc1ce07b1106c078aeab547c..cf2cd1ad84588684820e3456f8482d69c242cc77 100644 |
--- a/test/codegen/closure.dart |
+++ b/test/codegen/closure.dart |
@@ -1,7 +1,6 @@ |
library test; |
import 'dart:js'; |
- |
typedef void Callback({int i}); |
class Foo<T> { |
@@ -15,7 +14,7 @@ class Foo<T> { |
factory Foo.build() => new Foo(1, null); |
untyped_method(a, b) {} |
- |
+ |
T pass(T t) => t; |
String typed_method( |
@@ -29,6 +28,15 @@ class Foo<T> { |
static named_params(a, {b, c}) {} |
+ // Avoid colliding with Function.name & Function.length, as Closure fails to |
+ // lower these to ES6 (https://github.com/google/closure-compiler/issues/1460) |
+ static name() => 'Foo.name()'; |
+ static length() => 'Foo.length()'; |
+ |
+ static arguments() => 'Foo.arguments()'; |
+ static caller() => 'Foo.caller()'; |
+ static callee() => 'Foo.callee()'; |
+ |
nullary_method() {} |
function_params(int f(x, [y]), g(x, {String y, z}), Callback cb) { |
@@ -52,8 +60,14 @@ class Baz extends Foo<int> with Bar { |
Baz(int i) : super(i, 123); |
} |
-void main(args) {} |
+void main(args) { |
+ print(Foo.name()); |
+ print(Foo.length()); |
+ print(Foo.arguments()); |
+ print(Foo.caller()); |
+ print(Foo.callee()); |
+} |
const String some_top_level_constant = "abc"; |
final String some_top_level_final = "abc"; |
-String some_top_level_var = "abc"; |
+String some_top_level_var = "abc"; |