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

The compiler seems to report only the first error #234

Open
luauser32167 opened this issue Nov 22, 2022 · 2 comments
Open

The compiler seems to report only the first error #234

luauser32167 opened this issue Nov 22, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@luauser32167
Copy link
Contributor

fn main() {
  var x: int32 = "a"; // Error: Incompatible types int32 and str
  var y: int32 = "b"; // not reported
}

Reporting more than a single type error per compiler invocation (see this godbolt/compiler-explorer page) is good because it saves time.

@vtereshkov
Copy link
Owner

Yes, the compiler (not only the type checker) always stops on the first error and does not try to recover.

@vtereshkov vtereshkov added the enhancement New feature or request label Nov 22, 2022
@vtereshkov vtereshkov changed the title The type checker seems to report only the first error The compiler seems to report only the first error Nov 22, 2022
@marekmaskarinec
Copy link
Contributor

I'm personally like it this way. A lot of compilers that report multiple errors can report errors that only exist because of other errors.

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

No branches or pull requests

3 participants