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) { |