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

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

Issue 2748673002: Don't crash on static/non-static acccessors. (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | tests/co19/co19-kernel.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/kernel/builder_accessors.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/builder_accessors.dart b/pkg/front_end/lib/src/fasta/kernel/builder_accessors.dart
index 7cff07c50f2ad595d46e9aab0597c36675e5d717..50658378e4e55d873045e76eb43bf29f18fa089a 100644
--- a/pkg/front_end/lib/src/fasta/kernel/builder_accessors.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/builder_accessors.dart
@@ -435,6 +435,7 @@ class IncompletePropertyAccessor extends IncompleteSend {
if (builder == null) {
return buildThrowNoSuchMethodError(null);
}
+ setter = builder.target;
}
if (builder.hasProblem) {
return helper.buildProblemExpression(builder, name.name)
@@ -453,8 +454,8 @@ class IncompletePropertyAccessor extends IncompleteSend {
}
}
}
- if (getter == null) {
- return internalError("no getter for $name");
+ if (getter == null && setter == null) {
+ return internalError("No accessor for '$name'.");
}
return new StaticAccessor(helper, charOffset, getter, setter);
}
« no previous file with comments | « no previous file | tests/co19/co19-kernel.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698