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

Unified Diff: pkg/analyzer/test/src/summary/resynthesize_common.dart

Issue 2976263002: Resynthesize methods from Kernel. (Closed)
Patch Set: Fix for sync* and test. Created 3 years, 5 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
Index: pkg/analyzer/test/src/summary/resynthesize_common.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index cb2c82c4d15a89e6b398bc603155ba2c4079342f..dce0b95f0f287498bb94389124052c9b344d4936 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -9408,21 +9408,27 @@ class C {
Stream f() async* {}
}
''');
- if (isStrongMode) {
- checkElementText(library, r'''
+ checkElementText(library, r'''
import 'dart:async';
class C {
Stream<dynamic> f() async* {}
}
''');
- } else {
- checkElementText(library, r'''
-import 'dart:async';
+ }
+
+ test_member_function_syncStar() async {
+ var library = await checkLibrary(r'''
class C {
- Stream<dynamic> f() async* {}
+ Iterable<int> f() sync* {
+ yield 42;
+ }
+}
+''');
+ checkElementText(library, r'''
+class C {
+ Iterable<int> f() sync* {}
}
''');
- }
}
test_metadata_classDeclaration() async {
@@ -10293,8 +10299,14 @@ abstract class D {
}
test_method_inferred_type_nonStatic_implicit_return() async {
- var library = await checkLibrary(
- 'class C extends D { f() => null; } abstract class D { int f(); }');
+ var library = await checkLibrary('''
+class C extends D {
+ f() => null;
+}
+abstract class D {
+ int f();
+}
+''');
if (isStrongMode) {
checkElementText(library, r'''
class C extends D {
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_kernel_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698