nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
compiler: skip broken entities
[nit.git]
/
src
/
compiler
/
abstract_compiler.nit
diff --git
a/src/compiler/abstract_compiler.nit
b/src/compiler/abstract_compiler.nit
index
b79e9ba
..
3d6d939
100644
(file)
--- a/
src/compiler/abstract_compiler.nit
+++ b/
src/compiler/abstract_compiler.nit
@@
-1732,7
+1732,7
@@
abstract class AbstractCompilerVisitor
fun stmt(nexpr: nullable AExpr)
do
if nexpr == null then return
fun stmt(nexpr: nullable AExpr)
do
if nexpr == null then return
- if nexpr.mtype == null and not nexpr.is_typed then
+ if nexpr.is_broken then
# Untyped expression.
# Might mean dead code or invalid code
# so aborts
# Untyped expression.
# Might mean dead code or invalid code
# so aborts
@@
-3870,7
+3870,12
@@
end
# Here we load an process all modules passed on the command line
var mmodules = modelbuilder.parse(arguments)
# Here we load an process all modules passed on the command line
var mmodules = modelbuilder.parse(arguments)
-if mmodules.is_empty then return
+if mmodules.is_empty then
+ toolcontext.check_errors
+ toolcontext.errors_info
+ if toolcontext.error_count > 0 then exit(1) else exit(0)
+end
+
modelbuilder.run_phases
for mmodule in mmodules do
modelbuilder.run_phases
for mmodule in mmodules do