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

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

Issue 2376213003: Instantiate parameterized types of type parameters with 'dynamic' type arguments. (Closed)
Patch Set: Remove computeDefaultTypeArgument() and always use TypeSystem.instantiateToBounds(). Created 4 years, 2 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/test/src/summary/resynthesize_ast_test.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 '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 3560 matching lines...) Expand 10 before | Expand all | Expand 10 after
3571 checkLibrary(''' 3571 checkLibrary('''
3572 class C<S extends num, T extends C<S, T>> {} 3572 class C<S extends num, T extends C<S, T>> {}
3573 C c; 3573 C c;
3574 '''); 3574 ''');
3575 } 3575 }
3576 3576
3577 test_instantiateToBounds_boundRefersToItself() { 3577 test_instantiateToBounds_boundRefersToItself() {
3578 checkLibrary(''' 3578 checkLibrary('''
3579 class C<T extends C<T>> {} 3579 class C<T extends C<T>> {}
3580 C c; 3580 C c;
3581 var c2 = new C();
3582 class B {
3583 var c3 = new C();
3584 }
3581 '''); 3585 ''');
3582 } 3586 }
3583 3587
3584 test_instantiateToBounds_boundRefersToLaterTypeArgument() { 3588 test_instantiateToBounds_boundRefersToLaterTypeArgument() {
3585 checkLibrary(''' 3589 checkLibrary('''
3586 class C<T extends C<T, U>, U extends num> {} 3590 class C<T extends C<T, U>, U extends num> {}
3587 C c; 3591 C c;
3588 '''); 3592 ''');
3589 } 3593 }
3590 3594
(...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after
4673 fail('Unexpectedly tried to get unlinked summary for $uri'); 4677 fail('Unexpectedly tried to get unlinked summary for $uri');
4674 } 4678 }
4675 return serializedUnit; 4679 return serializedUnit;
4676 } 4680 }
4677 4681
4678 @override 4682 @override
4679 bool hasLibrarySummary(String uri) { 4683 bool hasLibrarySummary(String uri) {
4680 return true; 4684 return true;
4681 } 4685 }
4682 } 4686 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_ast_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698