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

Side by Side Diff: pkg/analyzer/test/src/summary/summary_common.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
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_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 analyzer.test.src.summary.summary_common; 5 library analyzer.test.src.summary.summary_common;
6 6
7 import 'package:analyzer/analyzer.dart'; 7 import 'package:analyzer/analyzer.dart';
8 import 'package:analyzer/dart/ast/ast.dart'; 8 import 'package:analyzer/dart/ast/ast.dart';
9 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/src/generated/engine.dart'; 10 import 'package:analyzer/src/generated/engine.dart';
(...skipping 4800 matching lines...) Expand 10 before | Expand all | Expand 10 after
4811 test_function_inferred_type_implicit_param() { 4811 test_function_inferred_type_implicit_param() {
4812 UnlinkedExecutable f = serializeExecutableText('void f(value) {}'); 4812 UnlinkedExecutable f = serializeExecutableText('void f(value) {}');
4813 expect(f.parameters[0].inferredTypeSlot, 0); 4813 expect(f.parameters[0].inferredTypeSlot, 0);
4814 } 4814 }
4815 4815
4816 test_function_inferred_type_implicit_return() { 4816 test_function_inferred_type_implicit_return() {
4817 UnlinkedExecutable f = serializeExecutableText('f() => null;'); 4817 UnlinkedExecutable f = serializeExecutableText('f() => null;');
4818 expect(f.inferredReturnTypeSlot, 0); 4818 expect(f.inferredReturnTypeSlot, 0);
4819 } 4819 }
4820 4820
4821 test_generic_gClass_gMethodStatic() {
4822 UnlinkedClass cls = serializeClassText('''
4823 class C<T, U> {
4824 static void m<V, W>(V v, W w) {
4825 }
4826 }
4827 ''');
4828 List<UnlinkedParam> params = cls.executables[0].parameters;
4829 checkParamTypeRef(params[0].type, 2);
4830 checkParamTypeRef(params[1].type, 1);
4831 }
4832
4821 test_generic_method_in_generic_class() { 4833 test_generic_method_in_generic_class() {
4822 UnlinkedClass cls = serializeClassText( 4834 UnlinkedClass cls = serializeClassText(
4823 'class C<T, U> { void m<V, W>(T t, U u, V v, W w) {} }'); 4835 'class C<T, U> { void m<V, W>(T t, U u, V v, W w) {} }');
4824 List<UnlinkedParam> params = cls.executables[0].parameters; 4836 List<UnlinkedParam> params = cls.executables[0].parameters;
4825 checkParamTypeRef(params[0].type, 4); 4837 checkParamTypeRef(params[0].type, 4);
4826 checkParamTypeRef(params[1].type, 3); 4838 checkParamTypeRef(params[1].type, 3);
4827 checkParamTypeRef(params[2].type, 2); 4839 checkParamTypeRef(params[2].type, 2);
4828 checkParamTypeRef(params[3].type, 1); 4840 checkParamTypeRef(params[3].type, 1);
4829 } 4841 }
4830 4842
(...skipping 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after
6693 final String absoluteUri; 6705 final String absoluteUri;
6694 final String relativeUri; 6706 final String relativeUri;
6695 final int numTypeParameters; 6707 final int numTypeParameters;
6696 6708
6697 _PrefixExpectation(this.kind, this.name, 6709 _PrefixExpectation(this.kind, this.name,
6698 {this.inLibraryDefiningUnit: false, 6710 {this.inLibraryDefiningUnit: false,
6699 this.absoluteUri, 6711 this.absoluteUri,
6700 this.relativeUri, 6712 this.relativeUri,
6701 this.numTypeParameters: 0}); 6713 this.numTypeParameters: 0});
6702 } 6714 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698