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

[FEATURE-REQUEST] [BUG] Return and reachable statement #34

Open
simonegazza opened this issue Jul 14, 2022 · 0 comments
Open

[FEATURE-REQUEST] [BUG] Return and reachable statement #34

simonegazza opened this issue Jul 14, 2022 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@simonegazza
Copy link
Collaborator

Description
Currently, when we are parsing the code, unreachable statement are considered a hard errors and LiSA throws an exception.

Reproducibility information
A programma like the following can produce the error:

fn func() -> i32 {
	let x = 2;
	if x == 2 {
		return 1;
	} else {
		return 3;
	}
	
	return 4;
}

Expected behavior
We should remove the unreachable statements during parsing, or make sure in some ways that LiSA does not give a ProgramValidationException: Unreachable node that is not marked as entrypoint.

@simonegazza simonegazza added bug Something isn't working enhancement New feature or request labels Jul 14, 2022
@simonegazza simonegazza self-assigned this Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant