haxe icon indicating copy to clipboard operation
haxe copied to clipboard

[php] Vector + conditionals can break diagnostics

Open RblSb opened this issue 2 years ago • 1 comments

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
  1. Open project
  2. Comment out second trace and build
  3. Uncomment it
  4. Diagnostics errors for array access: Recursive array get method

bug_vector_php_server.zip

RblSb avatar Mar 01 '23 15:03 RblSb