umka-lang icon indicating copy to clipboard operation
umka-lang copied to clipboard

The compiler seems to report only the first error

Open luauser32167 opened this issue 2 years ago • 2 comments

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.

luauser32167 avatar Nov 22 '22 15:11 luauser32167

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

vtereshkov avatar Nov 22 '22 15:11 vtereshkov

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.

marekmaskarinec avatar Nov 22 '22 16:11 marekmaskarinec