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

Unified Diff: pkg/compiler/lib/src/typechecker.dart

Issue 2141023002: Make initializing formal access available by default (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Additional clean-up, now ready to land Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution.dart ('k') | tests/isolate/compile_time_error_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/typechecker.dart
diff --git a/pkg/compiler/lib/src/typechecker.dart b/pkg/compiler/lib/src/typechecker.dart
index 3cf8a5681470731b31fbec03eb9836f952779095..74831e16b511b106549f0bb19f3c9ebef3d76d43 100644
--- a/pkg/compiler/lib/src/typechecker.dart
+++ b/pkg/compiler/lib/src/typechecker.dart
@@ -686,11 +686,7 @@ class TypeCheckerVisitor extends Visitor<DartType> {
message: 'Missing element for identifier'));
assert(invariant(
node,
- element.isVariable ||
- element.isRegularParameter ||
- element.isField ||
- (element.isInitializingFormal &&
- compiler.options.enableInitializingFormalAccess),
+ element.isVariable || element.isParameter || element.isField,
message: 'Unexpected context element ${element}'));
return element.computeType(resolution);
}
@@ -775,10 +771,7 @@ class TypeCheckerVisitor extends Visitor<DartType> {
return access;
}
if (receiverElement != null &&
- (receiverElement.isVariable ||
- receiverElement.isRegularParameter ||
- (receiverElement.isInitializingFormal &&
- compiler.options.enableInitializingFormalAccess))) {
+ (receiverElement.isVariable || receiverElement.isParameter)) {
Link<TypePromotion> typePromotions = typePromotionsMap[receiverElement];
if (typePromotions != null) {
while (!typePromotions.isEmpty) {
@@ -1095,10 +1088,7 @@ class TypeCheckerVisitor extends Visitor<DartType> {
}
ElementAccess createPromotedAccess(Element element) {
- if (element.isVariable ||
- element.isRegularParameter ||
- (element.isInitializingFormal &&
- compiler.options.enableInitializingFormalAccess)) {
+ if (element.isVariable || element.isParameter) {
TypePromotion typePromotion = getKnownTypePromotion(element);
if (typePromotion != null) {
return new PromotedAccess(element, typePromotion.type);
@@ -1215,11 +1205,7 @@ class TypeCheckerVisitor extends Visitor<DartType> {
}
}
- if (variable != null &&
- (variable.isVariable ||
- variable.isRegularParameter ||
- (variable.isInitializingFormal &&
- compiler.options.enableInitializingFormalAccess))) {
+ if (variable != null && (variable.isVariable || variable.isParameter)) {
DartType knownType = getKnownType(variable);
if (!knownType.isDynamic) {
DartType shownType = elements.getType(node.arguments.head);
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution.dart ('k') | tests/isolate/compile_time_error_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698