-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Labels
Description
Using the --keep-going option seems to allow partial initialization or MProperties.
Here the code to reproduce the problem:
import nitc::frontend
var toolcontext = new ToolContext
toolcontext.process_options(args)
var arguments = toolcontext.option_context.rest
# build model
var model = new Model
var mbuilder = new ModelBuilder(model, toolcontext)
var mmodules = mbuilder.parse_full(arguments)
# process
if mmodules.is_empty then return
mbuilder.run_phases
toolcontext.run_global_phases(mmodules)
for mproperty in model.mproperties do
print mproperty.intro
endWhen executed on contrib/, this produces:
Runtime error: Uninitialized attribute _intro (/home/morriar/dev/nit/contrib/nitc/model/model.nit:2156)
-------------------------------------------------
-- Stack Trace ------------------------------
-------------------------------------------------
` fatal_exit
` nitc$MProperty$intro (/home/morriar/dev/nit/contrib/nitc/model/model.nit:2156)
` test::test$core::Sys$main (test.nit:20)
` main
` __libc_start_main
` _start
`
-------------------------------------------------