Merge: More keep going
authorJean Privat <jean@pryen.org>
Mon, 8 Jun 2015 10:05:14 +0000 (06:05 -0400)
committerJean Privat <jean@pryen.org>
Mon, 8 Jun 2015 10:05:14 +0000 (06:05 -0400)
This improve the robustness of tools when given --keep-going.
Tools like nitpick, that have --keep-going by default, are more robust and collect more errors.

Moreover, the compiler can now compile simple programs with instructions that fail during the typing phase (most errors like unknown method or bad type).

These instructions are compiled with a run time error instead so the program is still expected to behave in an reliable way.

~~~nit
print 1
fail now
print 2
~~~

~~~sh
$ nitc kg.nit --keep-going
kg.nit:2,1--4: Error: method or variable `fail` unknown in `Sys`.
$ ./kg
1
Runtime error: FATAL: bad statement executed. (kg.nit:1)
~~~

One usage would be to force `c_src` to compile things even if it lags behind.

Pull-Request: #1440
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>

1  2 
src/compiler/abstract_compiler.nit
src/compiler/separate_compiler.nit
src/rapid_type_analysis.nit
src/semantize/typing.nit

Simple merge
Simple merge
Simple merge
Simple merge