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

Side by Side Diff: pkg/analyzer/lib/src/generated/element_resolver.dart

Issue 1215053003: Compute mixin application constructors in the ClassElement.constructors getter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 engine.resolver.element_resolver; 5 library engine.resolver.element_resolver;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'ast.dart'; 9 import 'ast.dart';
10 import 'element.dart'; 10 import 'element.dart';
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 InterfaceType superType = enclosingClass.supertype; 1042 InterfaceType superType = enclosingClass.supertype;
1043 if (superType == null) { 1043 if (superType == null) {
1044 // TODO(brianwilkerson) Report this error. 1044 // TODO(brianwilkerson) Report this error.
1045 return null; 1045 return null;
1046 } 1046 }
1047 SimpleIdentifier name = node.constructorName; 1047 SimpleIdentifier name = node.constructorName;
1048 String superName = name != null ? name.name : null; 1048 String superName = name != null ? name.name : null;
1049 ConstructorElement element = 1049 ConstructorElement element =
1050 superType.lookUpConstructor(superName, _definingLibrary); 1050 superType.lookUpConstructor(superName, _definingLibrary);
1051 if (element == null || 1051 if (element == null ||
1052 (!enclosingClass.mixinErrorsReported && 1052 (!enclosingClass.doesMixinLackConstructors &&
1053 !enclosingClass.isSuperConstructorAccessible(element))) { 1053 !enclosingClass.isSuperConstructorAccessible(element))) {
1054 if (name != null) { 1054 if (name != null) {
1055 _resolver.reportErrorForNode( 1055 _resolver.reportErrorForNode(
1056 CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER, node, [ 1056 CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER, node, [
1057 superType.displayName, 1057 superType.displayName,
1058 name 1058 name
1059 ]); 1059 ]);
1060 } else { 1060 } else {
1061 _resolver.reportErrorForNode( 1061 _resolver.reportErrorForNode(
1062 CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT, 1062 CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT,
(...skipping 1740 matching lines...) Expand 10 before | Expand all | Expand 10 after
2803 2803
2804 @override 2804 @override
2805 Element get staticElement => null; 2805 Element get staticElement => null;
2806 2806
2807 @override 2807 @override
2808 accept(AstVisitor visitor) => null; 2808 accept(AstVisitor visitor) => null;
2809 2809
2810 @override 2810 @override
2811 void visitChildren(AstVisitor visitor) {} 2811 void visitChildren(AstVisitor visitor) {}
2812 } 2812 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/element.dart ('k') | pkg/analyzer/lib/src/generated/error_verifier.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698