-
Notifications
You must be signed in to change notification settings - Fork 5
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
Arrays of mixed types are only allowed if the type is forced to Array<Dynamic> #6
Comments
This is for Haxe 4.0.0-preview.5 and Safety from master. |
This is not related to Safety. It's a pure Haxe behavior: http://try-haxe.mrcdk.com/#A3BF6 |
Sorry, bad example. I will provide correct example later. |
Feel free to reopen. |
Correct example: class Bug1Corrected {
public function foo(a : Array<Dynamic>) : Void {
trace(a);
}
public function bug() : Void {
// Arrays of mixed types are only allowed if the type is forced to Array<Dynamic>
// Bug in "safeArray"
foo(["A", 1]);
}
} Test project: https://github.com/restorer/haxe-safety-bugs/blob/master/safetybugs/Main.hx#L207 Pure Haxe: http://try-haxe.mrcdk.com/#CdD25 P.S. Also either I don't know how to reopen issues on github 😄 or I doesn't have permissions for that. |
See https://github.com/restorer/haxe-safety-bugs/blob/master/safetybugs/Main.hx#L43 for working example.
The text was updated successfully, but these errors were encountered: