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

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

Issue 1686453002: Fix for constant instance creation without type arguments. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/summary/resynthesize.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) 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 'dart:convert'; 7 import 'dart:convert';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/element/element.dart'; 10 import 'package:analyzer/dart/element/element.dart';
(...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after
1258 class C<K, V> { 1258 class C<K, V> {
1259 const C.named(K k, V v); 1259 const C.named(K k, V v);
1260 } 1260 }
1261 '''); 1261 ''');
1262 checkLibrary(r''' 1262 checkLibrary(r'''
1263 import 'a.dart' as p; 1263 import 'a.dart' as p;
1264 const V = const p.C<int, String>.named(1, '222'); 1264 const V = const p.C<int, String>.named(1, '222');
1265 '''); 1265 ''');
1266 } 1266 }
1267 1267
1268 test_const_invokeConstructor_generic_noTypeArguments() {
1269 checkLibrary(r'''
1270 class C<K, V> {
1271 const C();
1272 }
1273 const V = const C();
1274 ''');
1275 }
1276
1268 test_const_invokeConstructor_generic_unnamed() { 1277 test_const_invokeConstructor_generic_unnamed() {
1269 checkLibrary(r''' 1278 checkLibrary(r'''
1270 class C<K, V> { 1279 class C<K, V> {
1271 const C(); 1280 const C();
1272 } 1281 }
1273 const V = const C<int, String>(); 1282 const V = const C<int, String>();
1274 '''); 1283 ''');
1275 } 1284 }
1276 1285
1277 test_const_invokeConstructor_generic_unnamed_imported() { 1286 test_const_invokeConstructor_generic_unnamed_imported() {
(...skipping 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after
2997 fail('Unexpectedly tried to get unlinked summary for $uri'); 3006 fail('Unexpectedly tried to get unlinked summary for $uri');
2998 } 3007 }
2999 return serializedUnit; 3008 return serializedUnit;
3000 } 3009 }
3001 3010
3002 @override 3011 @override
3003 bool hasLibrarySummary(String uri) { 3012 bool hasLibrarySummary(String uri) {
3004 return true; 3013 return true;
3005 } 3014 }
3006 } 3015 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/resynthesize.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698