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

Side by Side Diff: pkg/analyzer/test/src/summary/resynthesize_common.dart

Issue 2541603002: Support for AwaitExpression in unlinked expressions. (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.src.serialization.elements_test; 5 library test.src.serialization.elements_test;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/constant/value.dart'; 8 import 'package:analyzer/dart/constant/value.dart';
9 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/dart/element/type.dart'; 10 import 'package:analyzer/dart/element/type.dart';
(...skipping 3611 matching lines...) Expand 10 before | Expand all | Expand 10 after
3622 int f(int x(String y)) => null; 3622 int f(int x(String y)) => null;
3623 String g(int x(String y)) => null; 3623 String g(int x(String y)) => null;
3624 var v = [f, g]; 3624 var v = [f, g];
3625 '''); 3625 ''');
3626 } 3626 }
3627 3627
3628 test_initializer_executable_with_return_type_from_closure() { 3628 test_initializer_executable_with_return_type_from_closure() {
3629 checkLibrary('var v = () => 0;'); 3629 checkLibrary('var v = () => 0;');
3630 } 3630 }
3631 3631
3632 test_initializer_executable_with_return_type_from_closure_await_dynamic() {
3633 checkLibrary('var v = (f) async => await f;');
3634 }
3635
3636 test_initializer_executable_with_return_type_from_closure_await_future_int() {
3637 checkLibrary(r'''
3638 import 'dart:async';
3639 var v = (Future<int> f) async => await f;
3640 ''');
3641 }
3642
3643 test_initializer_executable_with_return_type_from_closure_await_future_noArg() {
3644 checkLibrary(r'''
3645 import 'dart:async';
3646 var v = (Future f) async => await f;
3647 ''');
3648 }
3649
3632 test_initializer_executable_with_return_type_from_closure_field() { 3650 test_initializer_executable_with_return_type_from_closure_field() {
3633 checkLibrary(''' 3651 checkLibrary('''
3634 class C { 3652 class C {
3635 var v = () => 0; 3653 var v = () => 0;
3636 } 3654 }
3637 '''); 3655 ''');
3638 } 3656 }
3639 3657
3640 test_initializer_executable_with_return_type_from_closure_local() { 3658 test_initializer_executable_with_return_type_from_closure_local() {
3641 checkLibrary(''' 3659 checkLibrary('''
(...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after
4759 fail('Unexpectedly tried to get unlinked summary for $uri'); 4777 fail('Unexpectedly tried to get unlinked summary for $uri');
4760 } 4778 }
4761 return serializedUnit; 4779 return serializedUnit;
4762 } 4780 }
4763 4781
4764 @override 4782 @override
4765 bool hasLibrarySummary(String uri) { 4783 bool hasLibrarySummary(String uri) {
4766 return true; 4784 return true;
4767 } 4785 }
4768 } 4786 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698