Index: tests/language/closure_variable_shadow_test.dart |
diff --git a/tests/language/reify_typevar_test.dart b/tests/language/closure_variable_shadow_test.dart |
similarity index 57% |
copy from tests/language/reify_typevar_test.dart |
copy to tests/language/closure_variable_shadow_test.dart |
index 874efd681964049629144e7c794da601f50d354a..8f774b403491f7a3ff2c1cb67492ca646d269f0d 100644 |
--- a/tests/language/reify_typevar_test.dart |
+++ b/tests/language/closure_variable_shadow_test.dart |
@@ -4,13 +4,17 @@ |
import "package:expect/expect.dart"; |
-class Foo<T> { |
- reify() { |
- return T; |
+// The intermediate variable 'y' must either be preserved |
+// or parameters must be renamed. |
+ |
+foo(x) { |
+ var y = x; |
+ bar(x) { |
+ return y - x; |
} |
+ return bar; |
} |
main() { |
- Expect.equals(int, new Foo<int>().reify()); |
- Expect.equals(Foo, new Foo().runtimeType); |
+ Expect.equals(-10, foo(10)(20)); |
} |