simolus3 / zap

Zap is a fast web framework built on Dart
https://simonbinder.eu/zap/
MIT License
233 stars 12 forks source link

Support flow typing #10

Open simolus3 opened 2 years ago

simolus3 commented 2 years ago

In zap components, we move local variables to instance variables in a component. As flow analysis only works for local variables, code relying on flow typing will break.

We could use the analyzer to find variable references (SimpleIdentifier) that have a more specific static type than the local variable they're referencing. If that's the case, we could mark them somehow to generate the necessary cast or non-null assertion in the generator.