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

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

Issue 2039243002: Revert "New tests for initializing formal access." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/dart_messages/lib/shared_messages.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 b7fa5de07f72431bfc5fe075cc7694276c91329e..85710b11d3da5cbf9d040e3dd29402925f1cfc42 100644
--- a/pkg/compiler/lib/src/typechecker.dart
+++ b/pkg/compiler/lib/src/typechecker.dart
@@ -681,12 +681,7 @@ class TypeCheckerVisitor extends Visitor<DartType> {
assert(invariant(node, element != null,
message: 'Missing element for identifier'));
assert(invariant(
- node,
- element.isVariable ||
- element.isParameter ||
- element.isField ||
- (element.isInitializingFormal &&
- compiler.options.enableInitializingFormalAccess),
+ node, element.isVariable || element.isParameter || element.isField,
message: 'Unexpected context element ${element}'));
return element.computeType(resolution);
}
@@ -767,9 +762,7 @@ class TypeCheckerVisitor extends Visitor<DartType> {
return access;
}
if (receiverElement != null &&
- (receiverElement.isVariable || receiverElement.isParameter ||
- (receiverElement.isInitializingFormal &&
- compiler.options.enableInitializingFormalAccess))) {
+ (receiverElement.isVariable || receiverElement.isParameter)) {
Link<TypePromotion> typePromotions = typePromotionsMap[receiverElement];
if (typePromotions != null) {
while (!typePromotions.isEmpty) {
@@ -1085,9 +1078,7 @@ class TypeCheckerVisitor extends Visitor<DartType> {
}
ElementAccess createPromotedAccess(Element element) {
- if (element.isVariable || element.isParameter ||
- (element.isInitializingFormal &&
- compiler.options.enableInitializingFormalAccess)) {
+ if (element.isVariable || element.isParameter) {
TypePromotion typePromotion = getKnownTypePromotion(element);
if (typePromotion != null) {
return new PromotedAccess(element, typePromotion.type);
@@ -1222,11 +1213,7 @@ class TypeCheckerVisitor extends Visitor<DartType> {
}
}
- if (variable != null &&
- (variable.isVariable ||
- variable.isParameter ||
- (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/members.dart ('k') | pkg/dart_messages/lib/shared_messages.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698