haxe icon indicating copy to clipboard operation
haxe copied to clipboard

Infered variable type is Dynamic after completion request

Open RblSb opened this issue 3 years ago • 0 comments

This is fixed in master, but happens on 4.2.5. Extracted from basic Kha sample. Just thought if such thing can be added as test someway, if there is no other test already. (fixed between 2022-03-10 and 2022-03-23)

interface Canvas {
	var g2(get, null):Graphics;
}

class Graphics {
	public function begin() {}
}

class Main {
	static function main() {
		onRender(null);
	}

	static function onRender(canvas:Canvas) {
		// hover on `g` shows `Graphics`, but will be `Dynamic` after
		// completion request or trying to write new `g.` line
		final g = canvas.g2;
		g.begin();
	}
}

RblSb avatar Aug 23 '22 05:08 RblSb