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

[ide] false This cast has no effect, but some of its sub-expressions report #11203

Closed
Tracked by #11707
nadako opened this issue May 5, 2023 · 9 comments · Fixed by #11229
Closed
Tracked by #11707

[ide] false This cast has no effect, but some of its sub-expressions report #11203

nadako opened this issue May 5, 2023 · 9 comments · Fixed by #11229
Labels

Comments

@nadako
Copy link
Member

nadako commented May 5, 2023

Minimized from tink.core.Future:

function main() {
	var future = new Future();
	future.eager();
}

abstract Future({}) from {} {
	public function new() this = {};

	public inline function eager():Future {
		trace("much side effect!");
		return this;
	}
}

image

PS also what's that 2 in diagnostics(2)?

@nadako
Copy link
Member Author

nadako commented May 5, 2023

Another interesting thing. If I reload vscode and open Main.hx, I get this instead:
image

But if I save (just Ctrl+S, don't even need to modify the file!) it gets back to the original message.

@kLabz
Copy link
Contributor

kLabz commented May 5, 2023

PS also what's that 2 in diagnostics(2)?

You had two haxe LSP running at some point (or another extension using the source named "diagnostics"); that thing is a bit messed up atm (edit: should be fixed soon btw, can't repro anymore on my branch).

@kLabz
Copy link
Contributor

kLabz commented May 5, 2023

Also about the unused variable, this diagnostic is ignored when there are other errors so it only shows when the bug you're reporting hasn't triggered yet.

@Simn
Copy link
Member

Simn commented May 5, 2023

But that variable isn't unused

@kLabz
Copy link
Contributor

kLabz commented May 5, 2023

After inlining I suppose it's unused? Not sure in what order things happen there.

@RblSb
Copy link
Member

RblSb commented Nov 21, 2023

Can be reopened

@Simn
Copy link
Member

Simn commented Nov 21, 2023

#11220 fixed this, or is there another issue?

@RblSb
Copy link
Member

RblSb commented Nov 21, 2023

@Simn
Copy link
Member

Simn commented Nov 21, 2023

Ah yeah, that can be removed because I added a better one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants