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

Side by Side Diff: pkg/analyzer/test/generated/strong_mode_test.dart

Issue 2765153002: Fix analyzer formatter errors. (Closed)
Patch Set: Created 3 years, 9 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 | « pkg/analyzer/lib/src/generated/static_type_analyzer.dart ('k') | no next file » | 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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.generated.strong_mode_test; 5 library analyzer.test.generated.strong_mode_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; 10 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
(...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 Type parameter 'T' declared to extend 'num'. 1204 Type parameter 'T' declared to extend 'num'.
1205 The type 'String' was inferred from: 1205 The type 'String' was inferred from:
1206 Return type declared as '(T) → T' 1206 Return type declared as '(T) → T'
1207 used where '(String) → String' is required. 1207 used where '(String) → String' is required.
1208 1208
1209 Consider passing explicit type argument(s) to the generic. 1209 Consider passing explicit type argument(s) to the generic.
1210 1210
1211 '''); 1211 ''');
1212 } 1212 }
1213 1213
1214
1215 test_inference_error_genericFunction() async { 1214 test_inference_error_genericFunction() async {
1216 Source source = addSource(r''' 1215 Source source = addSource(r'''
1217 T max<T extends num>(T x, T y) => x < y ? y : x; 1216 T max<T extends num>(T x, T y) => x < y ? y : x;
1218 abstract class Iterable<T> { 1217 abstract class Iterable<T> {
1219 T get first; 1218 T get first;
1220 S fold<S>(S s, S f(S s, T t)); 1219 S fold<S>(S s, S f(S s, T t));
1221 } 1220 }
1222 test(Iterable values) { 1221 test(Iterable values) {
1223 num n = values.fold(values.first as num, max); 1222 num n = values.fold(values.first as num, max);
1224 } 1223 }
(...skipping 2699 matching lines...) Expand 10 before | Expand all | Expand 10 after
3924 var v = x; 3923 var v = x;
3925 v; // marker 3924 v; // marker
3926 } 3925 }
3927 int x = 3; 3926 int x = 3;
3928 '''; 3927 ''';
3929 CompilationUnit unit = await resolveSource(code); 3928 CompilationUnit unit = await resolveSource(code);
3930 assertPropagatedAssignedType(code, unit, typeProvider.intType, null); 3929 assertPropagatedAssignedType(code, unit, typeProvider.intType, null);
3931 assertTypeOfMarkedExpression(code, unit, typeProvider.intType, null); 3930 assertTypeOfMarkedExpression(code, unit, typeProvider.intType, null);
3932 } 3931 }
3933 } 3932 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/static_type_analyzer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698