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

Side by Side Diff: pkg/compiler/lib/src/resolution/class_hierarchy.dart

Issue 2809603002: Introduce ParameterStructure (Closed)
Patch Set: Fix. Created 3 years, 8 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 dart2js.resolution.class_hierarchy; 5 library dart2js.resolution.class_hierarchy;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/resolution.dart' show Resolution; 8 import '../common/resolution.dart' show Resolution;
9 import '../common_elements.dart' show CommonElements; 9 import '../common_elements.dart' show CommonElements;
10 import '../elements/resolution_types.dart'; 10 import '../elements/resolution_types.dart';
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 MessageKind kind = MessageKind.SUPER_CALL_TO_FACTORY; 195 MessageKind kind = MessageKind.SUPER_CALL_TO_FACTORY;
196 Map arguments = {'className': element.superclass.name}; 196 Map arguments = {'className': element.superclass.name};
197 // TODO(ahe): Why is this a compile-time error? Or if it is an error, 197 // TODO(ahe): Why is this a compile-time error? Or if it is an error,
198 // why do we bother to registerThrowNoSuchMethod below? 198 // why do we bother to registerThrowNoSuchMethod below?
199 reporter.reportErrorMessage(node, kind, arguments); 199 reporter.reportErrorMessage(node, kind, arguments);
200 superMember = new ErroneousElementX(kind, arguments, '', element); 200 superMember = new ErroneousElementX(kind, arguments, '', element);
201 registry.registerFeature(Feature.THROW_NO_SUCH_METHOD); 201 registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
202 } else { 202 } else {
203 ConstructorElement superConstructor = superMember; 203 ConstructorElement superConstructor = superMember;
204 superConstructor.computeType(resolution); 204 superConstructor.computeType(resolution);
205 if (!CallStructure.NO_ARGS.signatureApplies(superConstructor.type)) { 205 if (!CallStructure.NO_ARGS
206 .signatureApplies(superConstructor.parameterStructure)) {
206 MessageKind kind = MessageKind.NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT; 207 MessageKind kind = MessageKind.NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT;
207 reporter.reportErrorMessage(node, kind); 208 reporter.reportErrorMessage(node, kind);
208 superMember = new ErroneousElementX(kind, {}, '', element); 209 superMember = new ErroneousElementX(kind, {}, '', element);
209 } 210 }
210 } 211 }
211 FunctionElement constructor = 212 FunctionElement constructor =
212 new SynthesizedConstructorElementX.forDefault(superMember, element); 213 new SynthesizedConstructorElementX.forDefault(superMember, element);
213 if (superMember.isMalformed) { 214 if (superMember.isMalformed) {
214 ErroneousElement erroneousElement = superMember; 215 ErroneousElement erroneousElement = superMember;
215 resolution.registerCompileTimeError( 216 resolution.registerCompileTimeError(
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 Identifier selector = node.selector.asIdentifier(); 644 Identifier selector = node.selector.asIdentifier();
644 var e = prefixElement.lookupLocalMember(selector.source); 645 var e = prefixElement.lookupLocalMember(selector.source);
645 if (e == null || !e.impliesType) { 646 if (e == null || !e.impliesType) {
646 reporter.reportErrorMessage(node.selector, 647 reporter.reportErrorMessage(node.selector,
647 MessageKind.CANNOT_RESOLVE_TYPE, {'typeName': node.selector}); 648 MessageKind.CANNOT_RESOLVE_TYPE, {'typeName': node.selector});
648 return; 649 return;
649 } 650 }
650 loadSupertype(e, node); 651 loadSupertype(e, node);
651 } 652 }
652 } 653 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/kernel/world_builder.dart ('k') | pkg/compiler/lib/src/resolution/constructors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698