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

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

Issue 1948563002: allow 'super' in async and finally blocks (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 7 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/super_in_async3_test.dart ('k') | test/codegen/language/super_in_async5_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/language/super_in_async4_test.dart
diff --git a/test/codegen/language/generic_async_star_test.dart b/test/codegen/language/super_in_async4_test.dart
similarity index 59%
copy from test/codegen/language/generic_async_star_test.dart
copy to test/codegen/language/super_in_async4_test.dart
index cf18af84924948a71e6e6420322cdd082319b6b7..488502b4dc080a58ac2b7f560076790bcf9d907d 100644
--- a/test/codegen/language/generic_async_star_test.dart
+++ b/test/codegen/language/super_in_async4_test.dart
@@ -6,14 +6,17 @@ import "package:expect/expect.dart";
import 'dart:async';
-Stream/*<T>*/ foo/*<T>*/(/*=T*/ x) async* {
- for (int i = 0; i < 3; i++) {
- yield x;
- }
+class A {
+ Future/*<T>*/ foo/*<T>*/({/*=T*/ x}) async => x;
}
-main() async {
- await for (var x in foo/*<int>*/(1)) {
- Expect.equals(1, x);
+class B extends A {
+ Future<int> bar() async {
+ var x = await super.foo(x: 41);
+ return x + 1;
}
}
+
+main() async {
+ Expect.equals(42, await new B().bar());
+}
« no previous file with comments | « test/codegen/language/super_in_async3_test.dart ('k') | test/codegen/language/super_in_async5_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698