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

[display] missing "this code has no effect" diagnostic for arguments #7267

Closed
Gama11 opened this issue Jul 11, 2018 · 2 comments
Closed

[display] missing "this code has no effect" diagnostic for arguments #7267

Gama11 opened this issue Jul 11, 2018 · 2 comments
Labels
feature-ide IDE / Editor support

Comments

@Gama11
Copy link
Member

Gama11 commented Jul 11, 2018

The usage here is missing the "this code has no effect" diagnostic:

class Main {
	static function main() {}

	function foo(bar:Int) {
		bar;
	}
}

Contrast this with it being a regular variable (or field) instead, where it works as expected:

@Simn
Copy link
Member

Simn commented Sep 21, 2018

Looks like this was fixed during the tvar refactoring.

@Simn Simn closed this as completed Sep 21, 2018
@Gama11
Copy link
Member Author

Gama11 commented Sep 21, 2018

I wonder if there should be a diagnostic for the argument declaration as well (there is for regular var declarations). In theory that could be used for a Rename unused argument to _ code action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-ide IDE / Editor support
Projects
None yet
Development

No branches or pull requests

3 participants