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

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

Issue 1414913002: Introduce .isMalformed (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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
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 '../compiler.dart' show 8 import '../compiler.dart' show
9 Compiler; 9 Compiler;
10 import '../dart_types.dart'; 10 import '../dart_types.dart';
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 superConstructor.computeType(resolution); 204 superConstructor.computeType(resolution);
205 if (!CallStructure.NO_ARGS.signatureApplies( 205 if (!CallStructure.NO_ARGS.signatureApplies(
206 superConstructor.functionSignature)) { 206 superConstructor.functionSignature)) {
207 MessageKind kind = MessageKind.NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT; 207 MessageKind kind = MessageKind.NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT;
208 reporter.reportErrorMessage(node, kind); 208 reporter.reportErrorMessage(node, kind);
209 superMember = new ErroneousElementX(kind, {}, '', element); 209 superMember = new ErroneousElementX(kind, {}, '', element);
210 } 210 }
211 } 211 }
212 FunctionElement constructor = 212 FunctionElement constructor =
213 new SynthesizedConstructorElementX.forDefault(superMember, element); 213 new SynthesizedConstructorElementX.forDefault(superMember, element);
214 if (superMember.isErroneous) { 214 if (superMember.isMalformed) {
215 compiler.elementsWithCompileTimeErrors.add(constructor); 215 compiler.elementsWithCompileTimeErrors.add(constructor);
216 } 216 }
217 element.setDefaultConstructor(constructor, reporter); 217 element.setDefaultConstructor(constructor, reporter);
218 } 218 }
219 return element.computeType(resolution); 219 return element.computeType(resolution);
220 } 220 }
221 221
222 @override 222 @override
223 DartType visitEnum(Enum node) { 223 DartType visitEnum(Enum node) {
224 if (element == null) { 224 if (element == null) {
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 if (e == null || !e.impliesType) { 701 if (e == null || !e.impliesType) {
702 reporter.reportErrorMessage( 702 reporter.reportErrorMessage(
703 node.selector, 703 node.selector,
704 MessageKind.CANNOT_RESOLVE_TYPE, 704 MessageKind.CANNOT_RESOLVE_TYPE,
705 {'typeName': node.selector}); 705 {'typeName': node.selector});
706 return; 706 return;
707 } 707 }
708 loadSupertype(e, node); 708 loadSupertype(e, node);
709 } 709 }
710 } 710 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698