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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/fasta_accessors.dart

Issue 2963763002: Change how unresolved super sends are handled. (Closed)
Patch Set: Rebased on 6cb702b723184ef8875871e4c15004d1ea0a8460. Created 3 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
Index: pkg/front_end/lib/src/fasta/kernel/fasta_accessors.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/fasta_accessors.dart b/pkg/front_end/lib/src/fasta/kernel/fasta_accessors.dart
index 2c47c0018fe51c7d108badc29d3b6aac96e1b9f8..cbeac83592581b5837b05554cf96d48b4bb15a06 100644
--- a/pkg/front_end/lib/src/fasta/kernel/fasta_accessors.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/fasta_accessors.dart
@@ -102,10 +102,6 @@ abstract class BuilderHelper {
Expression receiver, String name, Arguments arguments, int offset,
{bool isSuper, bool isGetter, bool isSetter, bool isStatic});
- Expression invokeSuperNoSuchMethod(
- String name, Arguments arguments, int charOffset,
- {bool isGetter, bool isSetter});
-
bool checkArguments(FunctionNode function, Arguments arguments,
List<TypeParameter> typeParameters);
@@ -123,6 +119,12 @@ abstract class BuilderHelper {
TypeParameterType type, int offset, bool nonInstanceAccessIsError);
void warning(String message, [int charOffset]);
+
+ void warnUnresolvedSuperGet(Name name, int charOffset);
+
+ void warnUnresolvedSuperSet(Name name, int charOffset);
+
+ void warnUnresolvedSuperMethod(Name name, int charOffset);
}
abstract class FastaAccessor implements Accessor {
@@ -761,27 +763,13 @@ class SuperPropertyAccessor extends kernel.SuperPropertyAccessor
isConstantExpression: true,
isImplicitCall: true);
} else {
- return new DirectMethodInvocation(
- new KernelThisExpression(), getter, arguments)
- ..fileOffset = offset;
+ // TODO(ahe): This could be something like "super.property(...)" where
+ // property is a setter.
+ return internalError("Unhandled invocation ${getter.runtimeType}.",
+ helper.uri, offsetForToken(token));
}
}
- Expression makeInvalidRead() {
- int offset = offsetForToken(token);
- return helper.invokeSuperNoSuchMethod(
- plainNameForRead, new Arguments.empty()..fileOffset = offset, offset,
- isGetter: true);
- }
-
- Expression makeInvalidWrite(Expression value) {
- return helper.invokeSuperNoSuchMethod(
- plainNameForRead,
- new Arguments(<Expression>[value])..fileOffset = value.fileOffset,
- offsetForToken(token),
- isSetter: true);
- }
-
toString() => "SuperPropertyAccessor()";
@override
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/body_builder.dart ('k') | pkg/front_end/lib/src/fasta/kernel/frontend_accessors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698