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/kernel/lib/verifier.dart

Issue 3002053002: Make package:kernel's verifier pass fasta-compiled code, make fasta not return exitcode 1 for warni…
Patch Set: Created 3 years, 4 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/kernel/lib/verifier.dart
diff --git a/pkg/kernel/lib/verifier.dart b/pkg/kernel/lib/verifier.dart
index c923a8d7d8ae63fa57ba91655b87a83eda949e60..b81f09ac1d6d960211e816f30fb4ebb1b044c0f1 100644
--- a/pkg/kernel/lib/verifier.dart
+++ b/pkg/kernel/lib/verifier.dart
@@ -363,7 +363,15 @@ class VerifyingVisitor extends RecursiveVisitor {
if (node.target == null) {
problem(node, "StaticGet without target.");
}
- if (!node.target.hasGetter) {
+ // Currently Constructor.hasGetter returns `false` even though fasta uses it
+ // as a getter for internal purposes:
+ //
+ // Fasta is letting all call site of a redirecting constructor be resolved
+ // to the real target. In order to resolve it, it seems to add a body into
+ // the redirecting-factory constructor which caches the target constructor.
+ // That cache is via a `StaticGet(real-constructor)` node, which we make
+ // here pass the verifier.
+ if (!node.target.hasGetter && node.target is! Constructor) {
ahe 2017/08/21 13:48:33 Can you show provide me with an example of how thi
kustermann 2017/08/21 14:43:44 Followed Peter's recommendation offline and commen
problem(node, "StaticGet of '${node.target}' without getter.");
}
if (node.target.isInstanceMember) {

Powered by Google App Engine
This is Rietveld 408576698