#7821 is related to this, but it deserves its own issue.
Inlined code currently breaks the package filters of --macro nullSafety() / @:nullSafety, which is a real problem if the inlined code isn't controlled by you. Especially considering that the std lib isn't null safe yet. For instance, this prevents you from using regexes together with null safety on the Python target:
class Main {
@:nullSafety
static function main() {
~/foo/.match("bar");
}
}
>haxe -main Main -python foo.py
Main.hx:4: characters 3-22 : Null safety: Cannot assign nullable value here.
Of course Python's EReg should be updated, but that's just a band-aid and I expect there's many more such cases, a lot of them in libraries rather than the std lib.
#7821 is related to this, but it deserves its own issue.
Inlined code currently breaks the package filters of
--macro nullSafety()/@:nullSafety, which is a real problem if the inlined code isn't controlled by you. Especially considering that the std lib isn't null safe yet. For instance, this prevents you from using regexes together with null safety on the Python target:Of course Python's
ERegshould be updated, but that's just a band-aid and I expect there's many more such cases, a lot of them in libraries rather than the std lib.