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

Side by Side Diff: pkg/analyzer/test/src/context/mock_sdk.dart

Issue 2888073003: Fix a type inference corner case: return expression where void expected. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 analyzer.test.src.context.mock_sdk; 5 library analyzer.test.src.context.mock_sdk;
6 6
7 import 'package:analyzer/file_system/file_system.dart' as resource; 7 import 'package:analyzer/file_system/file_system.dart' as resource;
8 import 'package:analyzer/file_system/memory_file_system.dart' as resource; 8 import 'package:analyzer/file_system/memory_file_system.dart' as resource;
9 import 'package:analyzer/src/context/cache.dart'; 9 import 'package:analyzer/src/context/cache.dart';
10 import 'package:analyzer/src/context/context.dart'; 10 import 'package:analyzer/src/context/context.dart';
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 E get first; 263 E get first;
264 264
265 Iterable/*<R>*/ map/*<R>*/(/*=R*/ f(E e)); 265 Iterable/*<R>*/ map/*<R>*/(/*=R*/ f(E e));
266 266
267 /*=R*/ fold/*<R>*/(/*=R*/ initialValue, 267 /*=R*/ fold/*<R>*/(/*=R*/ initialValue,
268 /*=R*/ combine(/*=R*/ previousValue, E element)); 268 /*=R*/ combine(/*=R*/ previousValue, E element));
269 269
270 Iterable/*<T>*/ expand/*<T>*/(Iterable/*<T>*/ f(E element)); 270 Iterable/*<T>*/ expand/*<T>*/(Iterable/*<T>*/ f(E element));
271 271
272 Iterable<E> where(bool test(E element)); 272 Iterable<E> where(bool test(E element));
273
274 void forEach(void f(E element));
273 275
274 List<E> toList(); 276 List<E> toList();
275 } 277 }
276 278
277 class List<E> implements Iterable<E> { 279 class List<E> implements Iterable<E> {
278 List(); 280 List();
279 void add(E value) {} 281 void add(E value) {}
280 void addAll(Iterable<E> iterable) {} 282 void addAll(Iterable<E> iterable) {}
281 E operator [](int index) => null; 283 E operator [](int index) => null;
282 void operator []=(int index, E value) {} 284 void operator []=(int index, E value) {}
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 627
626 @override 628 @override
627 AnalysisCache createCacheFromSourceFactory(SourceFactory factory) { 629 AnalysisCache createCacheFromSourceFactory(SourceFactory factory) {
628 if (factory == null) { 630 if (factory == null) {
629 return super.createCacheFromSourceFactory(factory); 631 return super.createCacheFromSourceFactory(factory);
630 } 632 }
631 return new AnalysisCache( 633 return new AnalysisCache(
632 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); 634 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]);
633 } 635 }
634 } 636 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698