Skip to content
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

Autocomplete fails on structure with @:optional function #449

Closed
haxiomic opened this issue Jul 1, 2020 · 1 comment
Closed

Autocomplete fails on structure with @:optional function #449

haxiomic opened this issue Jul 1, 2020 · 1 comment

Comments

@haxiomic
Copy link
Contributor

haxiomic commented Jul 1, 2020

If a structure type has an @:optional function field, autocomplete fails when trying to complete structure fields

Repro

class Main {
	static function main() {
		example({
			// try autocomplete in here
		});
	}
	
	static function example(options: {
		@:optional var field: String; // this works fine
		@:optional /*dynamic*/ function callback(): Void; // breaks autocomplete (with or without dynamic)
	}) {

	}
}

This works if you remove @:optional from function callback(). Tested haxe 4.0.5 and 4.2.0 development branch

@haxiomic
Copy link
Contributor Author

haxiomic commented Jul 1, 2020

Maybe related to #409 which seems to have started happening again

@haxiomic haxiomic changed the title Autocomplete fails on structure with function Autocomplete fails on structure with @:optional function Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants