haxe
haxe copied to clipboard
[php] Vector + conditionals can break diagnostics
class Main {
static public function main() {
final vec = new haxe.ds.Vector(2);
trace(vec[0] == 5);
// comment this, build, uncomment, save file
trace(vec[1] == 5);
#if php
final foo = 1;
#else
final foo = 0;
#end
}
}
--class-path src
--main Main
--php bin/php
- Open project
- Comment out second trace and build
- Uncomment it
- Diagnostics errors for array access:
Recursive array get method