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

Make This code will never execute. a warning not an error #1766

Open
Snikimonkd opened this issue Jan 3, 2025 · 0 comments
Open

Make This code will never execute. a warning not an error #1766

Snikimonkd opened this issue Jan 3, 2025 · 0 comments
Assignees
Labels
Accepted Accepted Request Enhancement Request New feature or request Implemented Needs Verification Check if this issue is resolved

Comments

@Snikimonkd
Copy link

Snikimonkd commented Jan 3, 2025

This code is impossible to compile:

import std:io;

fn int main(String[] args) {
    int a = 1;
    io::printfn("%s", a);
    return 0;
    a = 2;
}

it throws an error:

Error: This code will never execute.

it is nice that compiler can detect dead spots in the code, but sometimes during debug sessions i place early returns and then i need to coment all the code after this return, would be nice to make this a warning

@lerno lerno self-assigned this Jan 3, 2025
@lerno lerno added Enhancement Request New feature or request Accepted Accepted Request Implemented Needs Verification Check if this issue is resolved labels Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted Request Enhancement Request New feature or request Implemented Needs Verification Check if this issue is resolved
Projects
None yet
Development

No branches or pull requests

2 participants