Mayank Patke
Mayank Patke
This is failing due to `--disable-type-inference`. See #48312 for a similar issue - I closed that one since some improvements we landed happened to fix it, but I can start...
Reduced example with no `import`s: ```dart class Foo { void blah() => print("Foo"); } void main() { final foo = Foo(); if (foo is Foo) throw 'bad foo'; foo.blah(); }...
The static type computation in dart2js doesn't take nullability into account. I'm working on correcting this.
I don't think this is something dart2js does. The error message points to dart-lang/build, so that's probably what's producing the error, and you might find someone more knowledgeable on that...
To clarify, we want to separate the type graph and call graph representations. Then we should be able to store a SideEffect object on each member in the *call graph*...
@annagrin: This is showing up in triage. Do we need to take any further action?
Why is it important to prevent the `dynamic get call => this;` stack overflow? Is anyone writing that and expecting different behavior?
Ack, and maybe I'd have different intuition looking at the AST vs. the actual syntax. Of course, I don't expect us to revamp the syntax this late. I agree with...
FWIW, dart2js has this: https://github.com/dart-lang/sdk/blob/a7e1e26446a0debcd54984afdf8d0de554469325/pkg/compiler/lib/src/js_model/records.dart#L490-L499 Your stack trace shows that this function can indeed be called via `FunctionData.forEachParameter`, so I think we can simply remove the `throw`: https://dart-review.googlesource.com/c/sdk/+/344380