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

Side by Side Diff: pkg/compiler/lib/src/typechecker.dart

Issue 2025853002: Introduces "--initializing-formal-access". (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Eliminated unnecessary changes, thus avoiding 35 failing tests. Created 4 years, 6 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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.typechecker; 5 library dart2js.typechecker;
6 6
7 import 'common/names.dart' show Identifiers; 7 import 'common/names.dart' show Identifiers;
8 import 'common/resolution.dart' show Resolution; 8 import 'common/resolution.dart' show Resolution;
9 import 'common/tasks.dart' show CompilerTask; 9 import 'common/tasks.dart' show CompilerTask;
10 import 'common.dart'; 10 import 'common.dart';
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 return new TypeLiteralAccess(elements.getTypeLiteralType(node)); 1050 return new TypeLiteralAccess(elements.getTypeLiteralType(node));
1051 } 1051 }
1052 return createResolvedAccess(node, name, element); 1052 return createResolvedAccess(node, name, element);
1053 } else if (element.isClassMember) { 1053 } else if (element.isClassMember) {
1054 // foo() where foo is a member. 1054 // foo() where foo is a member.
1055 return lookupMember(node, thisType, name, memberKind, null, 1055 return lookupMember(node, thisType, name, memberKind, null,
1056 lookupClassMember: element.isStatic); 1056 lookupClassMember: element.isStatic);
1057 } else if (element.isFunction) { 1057 } else if (element.isFunction) {
1058 // foo() where foo is a method in the same class. 1058 // foo() where foo is a method in the same class.
1059 return createResolvedAccess(node, name, element); 1059 return createResolvedAccess(node, name, element);
1060 } else if (element.isVariable || element.isParameter || element.isField) { 1060 } else if (element.isVariable ||
1061 element.isParameter ||
1062 element.isField ||
1063 element.isInitializingFormal) {
1061 // foo() where foo is a field in the same class. 1064 // foo() where foo is a field in the same class.
1062 return createResolvedAccess(node, name, element); 1065 return createResolvedAccess(node, name, element);
1063 } else if (element.isGetter || element.isSetter) { 1066 } else if (element.isGetter || element.isSetter) {
1064 return createResolvedAccess(node, name, element); 1067 return createResolvedAccess(node, name, element);
1065 } else { 1068 } else {
1066 reporter.internalError( 1069 reporter.internalError(
1067 element, 'Unexpected element kind ${element.kind}.'); 1070 element, 'Unexpected element kind ${element.kind}.');
1068 return null; 1071 return null;
1069 } 1072 }
1070 } 1073 }
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after
2023 2026
2024 visitTypedef(Typedef node) { 2027 visitTypedef(Typedef node) {
2025 // Do not typecheck [Typedef] nodes. 2028 // Do not typecheck [Typedef] nodes.
2026 } 2029 }
2027 2030
2028 visitNode(Node node) { 2031 visitNode(Node node) {
2029 reporter.internalError(node, 2032 reporter.internalError(node,
2030 'Unexpected node ${node.getObjectDescription()} in the type checker.'); 2033 'Unexpected node ${node.getObjectDescription()} in the type checker.');
2031 } 2034 }
2032 } 2035 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | tests/language/initializing_formal_access_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698