Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(704)

Unified Diff: test/codegen/language/generic_sync_star_test.dart

Issue 1935823002: include type parameters on generic sync/async functions (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/codegen/language/generic_async_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/language/generic_sync_star_test.dart
diff --git a/test/codegen/language/hashcode_dynamic_test.dart b/test/codegen/language/generic_sync_star_test.dart
similarity index 60%
copy from test/codegen/language/hashcode_dynamic_test.dart
copy to test/codegen/language/generic_sync_star_test.dart
index b705dd8afaaf98e39def9dde62120f5eff404962..52e2992c762c9ebccd09dac0c710ded14c211751 100644
--- a/test/codegen/language/hashcode_dynamic_test.dart
+++ b/test/codegen/language/generic_sync_star_test.dart
@@ -4,7 +4,15 @@
import "package:expect/expect.dart";
-void main() {
- dynamic x = 3;
- Expect.equals(3, x.hashCode);
+
+Iterable/*<T>*/ foo/*<T>*/(/*=T*/ x) sync* {
+ for (int i = 0; i < 3; i++) {
+ yield x;
+ }
+}
+
+main() {
+ for (var x in foo/*<int>*/(1)) {
+ Expect.equals(1, x);
+ }
}
« no previous file with comments | « test/codegen/language/generic_async_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698