-
-
Notifications
You must be signed in to change notification settings - Fork 661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type array access on Array<T> as Null<T> #6825
Type array access on Array<T> as Null<T> #6825
Conversation
I think it's for @ncannasse to review. |
We don't make any difference between |
While there is no difference for Haxe type system, macros/plugins may want to deal with
What kind of issues?
What if we add |
They already have |
@RealyUniqueName you need to follow the types, since a TMono/TLazy might link to a basic type |
@ncannasse Types are already followed before checking for |
Can i merge this? |
Looks ok, but the readByte() commit has nothing to do with the fix, I think ? |
It has. Compiler complains on signtature difference with the parent method. Because this one is infered as |
Current behavior
Behavior of this PR:
This PR adds
Null<>
for array read access on all platforms exceptInt
,Bool
,Float
on static targets.In addition to proper typing it also makes possible to check array access for null safety (i'm making a plugin for that).