Open restorer opened 6 years ago
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.