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

Side by Side Diff: pkg/analyzer/test/src/task/strong/strong_test_helper.dart

Issue 1609093003: fixes #25482, flatten Futures in strong mode so Future.then works (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 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 // TODO(jmesserly): this file needs to be refactored, it's a port from 5 // TODO(jmesserly): this file needs to be refactored, it's a port from
6 // package:dev_compiler's tests 6 // package:dev_compiler's tests
7 library analyzer.test.src.task.strong.strong_test_helper; 7 library analyzer.test.src.task.strong.strong_test_helper;
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/visitor.dart'; 10 import 'package:analyzer/dart/ast/visitor.dart';
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 89 }
90 class List<E> implements Iterable<E> { 90 class List<E> implements Iterable<E> {
91 List([int length]); 91 List([int length]);
92 List.filled(int length, E fill); 92 List.filled(int length, E fill);
93 } 93 }
94 class Map<K, V> { 94 class Map<K, V> {
95 Iterable<K> get keys {} 95 Iterable<K> get keys {}
96 } 96 }
97 ''', 97 ''',
98 'dart:async': ''' 98 'dart:async': '''
99 library dart.async;
99 class Future<T> { 100 class Future<T> {
100 Future(computation()) {} 101 Future(computation()) {}
101 Future.value(T t) {} 102 Future.value(T t) {}
102 static Future<List/*<T>*/> wait/*<T>*/( 103 static Future<List/*<T>*/> wait/*<T>*/(
103 Iterable<Future/*<T>*/> futures) => null; 104 Iterable<Future/*<T>*/> futures) => null;
104 Future/*<R>*/ then/*<R>*/(/*=R*/ onValue(T value)) => null; 105 Future/*<R>*/ then/*<R>*/(/*=R*/ onValue(T value)) => null;
105 } 106 }
106 class Stream<T> {} 107 class Stream<T> {}
107 ''', 108 ''',
108 'dart:html': ''' 109 'dart:html': '''
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 UriKind get uriKind => UriKind.DART_URI; 516 UriKind get uriKind => UriKind.DART_URI;
516 517
517 bool exists() => true; 518 bool exists() => true;
518 519
519 Source resolveRelative(Uri relativeUri) => 520 Source resolveRelative(Uri relativeUri) =>
520 throw new UnsupportedError('not expecting relative urls in dart: mocks'); 521 throw new UnsupportedError('not expecting relative urls in dart: mocks');
521 522
522 Uri resolveRelativeUri(Uri relativeUri) => 523 Uri resolveRelativeUri(Uri relativeUri) =>
523 throw new UnsupportedError('not expecting relative urls in dart: mocks'); 524 throw new UnsupportedError('not expecting relative urls in dart: mocks');
524 } 525 }
OLDNEW
« pkg/analyzer/lib/src/dart/element/type.dart ('K') | « pkg/analyzer/test/generated/resolver_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698