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

Side by Side Diff: pkg/analyzer/lib/src/summary/summarize_elements.dart

Issue 1711873002: Fix for summarizing typedef typed parameters. (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 | « no previous file | pkg/analyzer/test/generated/resolver_test.dart » ('j') | 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 serialization.elements; 5 library serialization.elements;
6 6
7 import 'package:analyzer/dart/element/element.dart'; 7 import 'package:analyzer/dart/element/element.dart';
8 import 'package:analyzer/dart/element/type.dart'; 8 import 'package:analyzer/dart/element/type.dart';
9 import 'package:analyzer/src/dart/element/element.dart'; 9 import 'package:analyzer/src/dart/element/element.dart';
10 import 'package:analyzer/src/dart/element/member.dart'; 10 import 'package:analyzer/src/dart/element/member.dart';
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 DartType type = parameter.type; 682 DartType type = parameter.type;
683 if (parameter.hasImplicitType) { 683 if (parameter.hasImplicitType) {
684 Element contextParent = context.enclosingElement; 684 Element contextParent = context.enclosingElement;
685 if (!parameter.isInitializingFormal && 685 if (!parameter.isInitializingFormal &&
686 contextParent is ExecutableElement && 686 contextParent is ExecutableElement &&
687 !contextParent.isStatic && 687 !contextParent.isStatic &&
688 contextParent is! ConstructorElement) { 688 contextParent is! ConstructorElement) {
689 b.inferredTypeSlot = storeInferredType(type, context); 689 b.inferredTypeSlot = storeInferredType(type, context);
690 } 690 }
691 } else { 691 } else {
692 if (type is FunctionType) { 692 if (type is FunctionType && type.element.isSynthetic) {
693 b.isFunctionTyped = true; 693 b.isFunctionTyped = true;
694 b.type = serializeTypeRef(type.returnType, parameter); 694 b.type = serializeTypeRef(type.returnType, parameter);
695 b.parameters = type.parameters 695 b.parameters = type.parameters
696 .map((parameter) => serializeParam(parameter, context)) 696 .map((parameter) => serializeParam(parameter, context))
697 .toList(); 697 .toList();
698 } else { 698 } else {
699 b.type = serializeTypeRef(type, context); 699 b.type = serializeTypeRef(type, context);
700 } 700 }
701 } 701 }
702 if (parameter is ConstVariableElement) { 702 if (parameter is ConstVariableElement) {
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 exportNames.add(new LinkedExportNameBuilder( 1363 exportNames.add(new LinkedExportNameBuilder(
1364 name: name, 1364 name: name,
1365 dependency: serializeDependency(dependentLibrary), 1365 dependency: serializeDependency(dependentLibrary),
1366 unit: unit, 1366 unit: unit,
1367 kind: kind)); 1367 kind: kind));
1368 } 1368 }
1369 pb.exportNames = exportNames; 1369 pb.exportNames = exportNames;
1370 return pb; 1370 return pb;
1371 } 1371 }
1372 } 1372 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698