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

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

Issue 1695033002: Ignore enclosing class type parameters in resynthesizing static class members. (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
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 2477 matching lines...) Expand 10 before | Expand all | Expand 10 after
2488 2488
2489 test_function_type_parameter_with_function_typed_parameter() { 2489 test_function_type_parameter_with_function_typed_parameter() {
2490 resetWithOptions(new AnalysisOptionsImpl()..enableGenericMethods = true); 2490 resetWithOptions(new AnalysisOptionsImpl()..enableGenericMethods = true);
2491 checkLibrary('void f<T, U>(T x(U u)) {}'); 2491 checkLibrary('void f<T, U>(T x(U u)) {}');
2492 } 2492 }
2493 2493
2494 test_functions() { 2494 test_functions() {
2495 checkLibrary('f() {} g() {}'); 2495 checkLibrary('f() {} g() {}');
2496 } 2496 }
2497 2497
2498 test_generic_gClass_gMethodStatic() {
2499 resetWithOptions(new AnalysisOptionsImpl()..enableGenericMethods = true);
2500 checkLibrary('''
2501 class C<T, U> {
2502 static void m<V, W>(V v, W w) {
2503 }
2504 }
2505 ''');
2506 }
2507
2498 test_getElement_constructor_named() { 2508 test_getElement_constructor_named() {
2499 ConstructorElement original = resolve2(addSource('class C { C.named(); }')) 2509 ConstructorElement original = resolve2(addSource('class C { C.named(); }'))
2500 .getType('C') 2510 .getType('C')
2501 .getNamedConstructor('named'); 2511 .getNamedConstructor('named');
2502 expect(original, isNotNull); 2512 expect(original, isNotNull);
2503 ConstructorElement resynthesized = validateGetElement(original); 2513 ConstructorElement resynthesized = validateGetElement(original);
2504 compareConstructorElements(resynthesized, original, 'C.constructor named'); 2514 compareConstructorElements(resynthesized, original, 'C.constructor named');
2505 } 2515 }
2506 2516
2507 test_getElement_constructor_unnamed() { 2517 test_getElement_constructor_unnamed() {
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
3497 fail('Unexpectedly tried to get unlinked summary for $uri'); 3507 fail('Unexpectedly tried to get unlinked summary for $uri');
3498 } 3508 }
3499 return serializedUnit; 3509 return serializedUnit;
3500 } 3510 }
3501 3511
3502 @override 3512 @override
3503 bool hasLibrarySummary(String uri) { 3513 bool hasLibrarySummary(String uri) {
3504 return true; 3514 return true;
3505 } 3515 }
3506 } 3516 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/resynthesize.dart ('k') | pkg/analyzer/test/src/summary/summary_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698