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

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

Issue 2638063003: Reverts the following two commits: (Closed)
Patch Set: Created 3 years, 11 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.constructors; 5 library dart2js.resolution.constructors;
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 '../constants/constructors.dart' 9 import '../constants/constructors.dart'
10 show 10 show
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 null, 612 null,
613 element.name, 613 element.name,
614 MessageKind.NOT_A_TYPE, 614 MessageKind.NOT_A_TYPE,
615 {'node': diagnosticNode}); 615 {'node': diagnosticNode});
616 } 616 }
617 } 617 }
618 resolver.registry.setType(expression, result.type); 618 resolver.registry.setType(expression, result.type);
619 return result; 619 return result;
620 } 620 }
621 621
622 ConstructorResult visitNominalTypeAnnotation(NominalTypeAnnotation node) { 622 ConstructorResult visitTypeAnnotation(TypeAnnotation node) {
623 // This is not really resolving a type-annotation, but the name of the 623 // This is not really resolving a type-annotation, but the name of the
624 // constructor. Therefore we allow deferred types. 624 // constructor. Therefore we allow deferred types.
625 ResolutionDartType type = resolver.resolveTypeAnnotation(node, 625 ResolutionDartType type = resolver.resolveTypeAnnotation(node,
626 malformedIsError: inConstContext, 626 malformedIsError: inConstContext,
627 deferredIsMalformed: false, 627 deferredIsMalformed: false,
628 registerCheckedModeCheck: false); 628 registerCheckedModeCheck: false);
629 Send send = node.typeName.asSend(); 629 Send send = node.typeName.asSend();
630 PrefixElement prefix; 630 PrefixElement prefix;
631 if (send != null) { 631 if (send != null) {
632 // The type name is of the form [: prefix . identifier :]. 632 // The type name is of the form [: prefix . identifier :].
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 // constructors. 885 // constructors.
886 return null; 886 return null;
887 } 887 }
888 // TODO(johnniwinther): Use [Name] for lookup. 888 // TODO(johnniwinther): Use [Name] for lookup.
889 ConstructorElement constructor = cls.lookupConstructor(constructorName); 889 ConstructorElement constructor = cls.lookupConstructor(constructorName);
890 if (constructor != null) { 890 if (constructor != null) {
891 constructor = constructor.declaration; 891 constructor = constructor.declaration;
892 } 892 }
893 return constructor; 893 return constructor;
894 } 894 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/class_hierarchy.dart ('k') | pkg/compiler/lib/src/resolution/resolution_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698