From becd60cf8a3369585b52addb7834c5e419eda1f5 Mon Sep 17 00:00:00 2001 From: Florian Deljarry Date: Wed, 6 Nov 2019 14:08:23 -0500 Subject: [PATCH] tests: Fix tests Signed-off-by: Florian Deljarry --- lib/bucketed_game/bucketed_game.nit | 7 +- src/doc/commands/tests/test_commands_http.nit | 4 +- src/doc/commands/tests/test_commands_model.nit | 10 +- src/doc/commands/tests/test_commands_parser.nit | 2 +- .../tests/test_html_commands.sav/test_cmd_call.res | 2 +- .../test_html_commands.sav/test_cmd_features.res | 2 +- .../tests/test_html_commands.sav/test_cmd_lin.res | 2 +- .../tests/test_json_commands.sav/test_cmd_call.res | 48 +- .../test_json_commands.sav/test_cmd_features.res | 45 ++ .../tests/test_json_commands.sav/test_cmd_lin.res | 23 - .../test_propdefs_to_full_json.res | 773 ++++++++++++++++++- .../test_props_to_full_json.res | 781 +++++++++++++++++++- .../tests/test_md_commands.sav/test_cmd_call.res | 2 +- .../test_md_commands.sav/test_cmd_features.res | 1 + .../tests/test_md_commands.sav/test_cmd_lin.res | 1 - src/doc/term/tests/test_term.sav/test_call.res | 4 +- src/doc/term/tests/test_term.sav/test_lin.res | 2 +- .../test_term.sav/test_term_catalog_stats.res | 2 +- tests/base_attr_nullable.nit | 1 - tests/base_init_super_call2.nit | 55 +- tests/base_simple3.nit | 6 +- tests/error_defs_init.nit | 8 +- tests/sav/base_arg_default_autoinit_alt1.res | 18 +- tests/sav/base_attr_annot_1alt1.res | 2 +- tests/sav/base_attr_annot_alt1.res | 2 +- tests/sav/base_attr_nullable_alt1.res | 2 +- tests/sav/base_attr_nullable_alt2.res | 2 +- tests/sav/base_attr_nullable_alt3.res | 2 +- tests/sav/base_attr_nullable_alt4.res | 2 +- tests/sav/base_attr_nullable_alt5.res | 2 +- tests/sav/base_init_basic_alt3.res | 4 +- tests/sav/base_init_basic_alt5.res | 2 +- tests/sav/base_init_combine_alt1.res | 2 +- tests/sav/base_init_noinit_alt4.res | 2 +- tests/sav/base_init_super_call2_alt3.res | 28 +- tests/sav/base_init_super_call2_alt4.res | 2 +- tests/sav/base_init_super_call2_alt5.res | 2 +- tests/sav/base_init_super_call2_alt6.res | 28 +- tests/sav/base_init_super_call_alt3.res | 24 +- tests/sav/base_new_alt8.res | 1 + tests/sav/base_vararg_mult_alt1.res | 4 +- tests/sav/error_class_glob.res | 15 +- tests/sav/error_defs_init_1alt2_alt2.res | 2 +- tests/sav/error_init_auto.res | 6 +- tests/sav/error_init_auto_alt1.res | 6 +- tests/sav/error_init_auto_alt2.res | 6 +- tests/sav/error_init_auto_alt3.res | 6 +- tests/sav/error_init_auto_alt4.res | 6 +- tests/sav/nitcatalog_args1.res | 4 +- tests/sav/nitdoc_args1.res | 9 +- tests/sav/nitdoc_args2.res | 9 +- tests/sav/nitdoc_args3.res | 9 +- tests/sav/nitdoc_args4.res | 4 +- tests/sav/nitlight_args1.res | 56 +- tests/sav/nitlight_args2.res | 56 +- tests/sav/nitlight_args3.res | 20 +- tests/sav/nitlight_args4.res | 6 +- tests/sav/nitlight_args5.res | 56 +- tests/sav/nitmetrics_args1.res | 324 ++++---- tests/sav/nitsmells_args1.res | 2 +- tests/sav/nitsmells_args3.res | 2 +- tests/sav/nituml_args1.res | 4 +- tests/sav/nituml_args2.res | 2 +- tests/sav/nituml_args3.res | 34 +- tests/sav/nituml_args4.res | 30 +- tests/sav/nitx_args2.res | 2 +- tests/sav/nitx_args3.res | 6 +- tests/sav/test_highlight_args1.res | 142 ++-- tests/sav/test_model_index_args16.res | 1 + tests/sav/test_model_visitor_args1.res | 227 +++--- tests/sav/test_model_visitor_args2.res | 170 +++-- tests/sav/test_neo_args1.res | 56 +- tests/sav/test_test_phase_args1.res | 4 +- 73 files changed, 2347 insertions(+), 847 deletions(-) diff --git a/lib/bucketed_game/bucketed_game.nit b/lib/bucketed_game/bucketed_game.nit index 213d875..0da2b33 100644 --- a/lib/bucketed_game/bucketed_game.nit +++ b/lib/bucketed_game/bucketed_game.nit @@ -171,9 +171,10 @@ class GameTurn[G: Game] var game: G # Create a new game turn for `game`. - init (game: G) is old_style_init do - super(game.tick) - self.game = game + init(game: G) + do + _tick = game.tick + _game = game end # Insert the Bucketable event `e` to be executed at next tick. diff --git a/src/doc/commands/tests/test_commands_http.nit b/src/doc/commands/tests/test_commands_http.nit index 57f5dd6..1f51238 100644 --- a/src/doc/commands/tests/test_commands_http.nit +++ b/src/doc/commands/tests/test_commands_http.nit @@ -205,7 +205,7 @@ class TestCommandsHttp var cmd = new CmdFeatures(test_model) var res = cmd.http_init(req) assert res isa CmdSuccess - assert cmd.results.as(not null).length == 3 + assert cmd.results.as(not null).length == 4 end # CmdLinearization @@ -215,7 +215,7 @@ class TestCommandsHttp var cmd = new CmdLinearization(test_model, test_main) var res = cmd.http_init(req) assert res isa CmdSuccess - assert cmd.results.as(not null).length == 10 + assert cmd.results.as(not null).length == 9 end fun test_cmd_http_lin_no_lin is test do diff --git a/src/doc/commands/tests/test_commands_model.nit b/src/doc/commands/tests/test_commands_model.nit index 4847987..0ee6952 100644 --- a/src/doc/commands/tests/test_commands_model.nit +++ b/src/doc/commands/tests/test_commands_model.nit @@ -181,7 +181,7 @@ class TestCommandsModel var cmd = new CmdFeatures(test_model, mentity_name = "test_prog::Career") var res = cmd.init_command assert res isa CmdSuccess - assert cmd.results.as(not null).length == 10 + assert cmd.results.as(not null).length == 11 end fun test_cmd_features_with_filter_attribute is test do @@ -189,7 +189,7 @@ class TestCommandsModel var cmd = new CmdFeatures(test_model, filter, mentity_name = "test_prog::Career") var res = cmd.init_command assert res isa CmdSuccess - assert cmd.results.as(not null).length == 7 + assert cmd.results.as(not null).length == 8 end fun test_cmd_features_with_filter_public is test do @@ -197,7 +197,7 @@ class TestCommandsModel var cmd = new CmdFeatures(test_model, filter, mentity_name = "test_prog::Career") var res = cmd.init_command assert res isa CmdSuccess - assert cmd.results.as(not null).length == 4 + assert cmd.results.as(not null).length == 5 end fun test_cmd_features_with_filter_match is test do @@ -214,7 +214,7 @@ class TestCommandsModel var cmd = new CmdFeatures(test_model, filter, mentity_name = "test_prog::TestGame") var res = cmd.init_command assert res isa CmdSuccess - assert cmd.results.as(not null).length == 3 + assert cmd.results.as(not null).length == 4 end fun test_cmd_features_no_features is test do @@ -229,7 +229,7 @@ class TestCommandsModel var cmd = new CmdLinearization(test_model, test_main, mentity_name = "init") var res = cmd.init_command assert res isa CmdSuccess - assert cmd.results.as(not null).length == 10 + assert cmd.results.as(not null).length == 9 end fun test_cmd_lin_no_lin is test do diff --git a/src/doc/commands/tests/test_commands_parser.nit b/src/doc/commands/tests/test_commands_parser.nit index 41cc36b..f5d6699 100644 --- a/src/doc/commands/tests/test_commands_parser.nit +++ b/src/doc/commands/tests/test_commands_parser.nit @@ -239,7 +239,7 @@ class TestCommandsParser var cmd = parser.parse("defs: test_prog::TestGame | inherited: TestGame") assert cmd isa CmdFeatures assert parser.error == null - assert cmd.results.as(not null).length == 3 + assert cmd.results.as(not null).length == 4 end # CmdLinearization diff --git a/src/doc/templates/tests/test_html_commands.sav/test_cmd_call.res b/src/doc/templates/tests/test_html_commands.sav/test_cmd_call.res index 6663e41..ab2acab 100644 --- a/src/doc/templates/tests/test_html_commands.sav/test_cmd_call.res +++ b/src/doc/templates/tests/test_html_commands.sav/test_cmd_call.res @@ -1 +1 @@ - + diff --git a/src/doc/templates/tests/test_html_commands.sav/test_cmd_features.res b/src/doc/templates/tests/test_html_commands.sav/test_cmd_features.res index 8904ee1..2f71284 100644 --- a/src/doc/templates/tests/test_html_commands.sav/test_cmd_features.res +++ b/src/doc/templates/tests/test_html_commands.sav/test_cmd_features.res @@ -1 +1 @@ - + diff --git a/src/doc/templates/tests/test_html_commands.sav/test_cmd_lin.res b/src/doc/templates/tests/test_html_commands.sav/test_cmd_lin.res index 3ae2de3..c7f7cf4 100644 --- a/src/doc/templates/tests/test_html_commands.sav/test_cmd_lin.res +++ b/src/doc/templates/tests/test_html_commands.sav/test_cmd_lin.res @@ -1 +1 @@ - + diff --git a/src/doc/templates/tests/test_json_commands.sav/test_cmd_call.res b/src/doc/templates/tests/test_json_commands.sav/test_cmd_call.res index 0b60952..087789a 100644 --- a/src/doc/templates/tests/test_json_commands.sav/test_cmd_call.res +++ b/src/doc/templates/tests/test_json_commands.sav/test_cmd_call.res @@ -1,6 +1,6 @@ { "results": [{ - "name": "init", + "name": "defaultinit", "namespace": [{ "name": "test_prog", "synopsis": "Test program for model tools." @@ -8,18 +8,48 @@ "name": "Character", "synopsis": "Characters can be played by both the human or the machine." }, "$", { - "name": "Object", - "synopsis": "Root of everything." - }, "::", { - "name": "init" + "name": "defaultinit" }], "class_name": "MMethodDef", - "full_name": "test_prog$Character$Object::init", + "full_name": "test_prog$Character$defaultinit", "visibility": "public", - "modifiers": ["redef", "init"], + "modifiers": ["init"], + "is_intro": true, "msignature": { - "arity": 0, - "mparameters": [], + "arity": 4, + "mparameters": [{ + "is_vararg": false, + "name": "race", + "mtype": { + "name": "Race", + "synopsis": "Race determines basic characteristics and what the character will be able to do in life.", + "html_synopsis": "Race determines basic characteristics and what the character will be able to do in life." + } + }, { + "is_vararg": false, + "name": "name", + "mtype": { + "name": "String", + "synopsis": "Strings (there is no chars...).", + "html_synopsis": "Strings (there is no chars...)." + } + }, { + "is_vararg": false, + "name": "age", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "sex", + "mtype": { + "name": "Bool", + "synopsis": "Booleans, `true` or `false`.", + "html_synopsis": "Booleans, true or false." + } + }], "return_mtype": null } }, { diff --git a/src/doc/templates/tests/test_json_commands.sav/test_cmd_features.res b/src/doc/templates/tests/test_json_commands.sav/test_cmd_features.res index 88019d8..e07fe59 100644 --- a/src/doc/templates/tests/test_json_commands.sav/test_cmd_features.res +++ b/src/doc/templates/tests/test_json_commands.sav/test_cmd_features.res @@ -69,6 +69,51 @@ "html_synopsis": "Some services about Integers." } }, { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "Career", + "synopsis": "A `Career` gives a characteristic bonus or malus to the character." + }, "::", { + "name": "defaultinit" + }], + "class_name": "MMethod", + "full_name": "test_prog::Career::defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_init": true, + "msignature": { + "arity": 3, + "mparameters": [{ + "is_vararg": false, + "name": "strength_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "endurance_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "intelligence_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }], + "return_mtype": null + } + }, { "name": "endurance_bonus", "namespace": [{ "name": "test_prog", diff --git a/src/doc/templates/tests/test_json_commands.sav/test_cmd_lin.res b/src/doc/templates/tests/test_json_commands.sav/test_cmd_lin.res index c7ddd5a..957889a 100644 --- a/src/doc/templates/tests/test_json_commands.sav/test_cmd_lin.res +++ b/src/doc/templates/tests/test_json_commands.sav/test_cmd_lin.res @@ -187,29 +187,6 @@ "name": "test_prog", "synopsis": "Test program for model tools." }, "$", { - "name": "Character", - "synopsis": "Characters can be played by both the human or the machine." - }, "$", { - "name": "Object", - "synopsis": "Root of everything." - }, "::", { - "name": "init" - }], - "class_name": "MMethodDef", - "full_name": "test_prog$Character$Object::init", - "visibility": "public", - "modifiers": ["redef", "init"], - "msignature": { - "arity": 0, - "mparameters": [], - "return_mtype": null - } - }, { - "name": "init", - "namespace": [{ - "name": "test_prog", - "synopsis": "Test program for model tools." - }, "$", { "name": "Dwarf", "synopsis": "Dwarves make strong warriors." }, "$", { diff --git a/src/doc/templates/tests/test_json_model.sav/test_propdefs_to_full_json.res b/src/doc/templates/tests/test_json_model.sav/test_propdefs_to_full_json.res index 802b1ec..126aca2 100644 --- a/src/doc/templates/tests/test_json_model.sav/test_propdefs_to_full_json.res +++ b/src/doc/templates/tests/test_json_model.sav/test_propdefs_to_full_json.res @@ -312,23 +312,21 @@ } } { - "name": "init", + "name": "defaultinit", "namespace": [{ "name": "test_prog", "synopsis": "Test program for model tools." }, "$", { - "name": "Character", - "synopsis": "Characters can be played by both the human or the machine." - }, "$", { "name": "Object", "synopsis": "Root of everything." - }, "::", { - "name": "init" + }, "$", { + "name": "defaultinit" }], "class_name": "MMethodDef", - "full_name": "test_prog$Character$Object::init", + "full_name": "test_prog$Object$defaultinit", "visibility": "public", - "modifiers": ["redef", "init"], + "modifiers": ["init"], + "is_intro": true, "msignature": { "arity": 0, "mparameters": [], @@ -558,6 +556,28 @@ } } { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "$", { + "name": "Int", + "synopsis": "Some services about Integers." + }, "$", { + "name": "defaultinit" + }], + "class_name": "MMethodDef", + "full_name": "test_prog$Int$defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_intro": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ "name": "+", "namespace": [{ "name": "test_prog", @@ -728,6 +748,94 @@ } } { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "$", { + "name": "Float", + "synopsis": "Some services about Floats." + }, "$", { + "name": "defaultinit" + }], + "class_name": "MMethodDef", + "full_name": "test_prog$Float$defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_intro": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "$", { + "name": "Bool", + "synopsis": "Booleans, `true` or `false`." + }, "$", { + "name": "defaultinit" + }], + "class_name": "MMethodDef", + "full_name": "test_prog$Bool$defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_intro": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "$", { + "name": "String", + "synopsis": "Strings (there is no chars...)." + }, "$", { + "name": "defaultinit" + }], + "class_name": "MMethodDef", + "full_name": "test_prog$String$defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_intro": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "$", { + "name": "List", + "synopsis": "List of things." + }, "$", { + "name": "defaultinit" + }], + "class_name": "MMethodDef", + "full_name": "test_prog$List$defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_intro": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ "name": "main", "namespace": [{ "name": "test_prog", @@ -774,6 +882,28 @@ } } { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "$", { + "name": "Sys", + "synopsis": "Sys" + }, "$", { + "name": "defaultinit" + }], + "class_name": "MMethodDef", + "full_name": "test_prog$Sys$defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_intro": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ "name": "_strength_bonus", "namespace": [{ "name": "test_prog", @@ -1008,6 +1138,190 @@ } } { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "$", { + "name": "Career", + "synopsis": "A `Career` gives a characteristic bonus or malus to the character." + }, "$", { + "name": "defaultinit" + }], + "class_name": "MMethodDef", + "full_name": "test_prog$Career$defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_intro": true, + "msignature": { + "arity": 3, + "mparameters": [{ + "is_vararg": false, + "name": "strength_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "endurance_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "intelligence_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }], + "return_mtype": null + } +} +{ + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "$", { + "name": "Warrior", + "synopsis": "Warriors are good for fighting." + }, "$", { + "name": "defaultinit" + }], + "class_name": "MMethodDef", + "full_name": "test_prog$Warrior$defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_intro": true, + "msignature": { + "arity": 3, + "mparameters": [{ + "is_vararg": false, + "name": "strength_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "endurance_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "intelligence_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }], + "return_mtype": null + } +} +{ + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "$", { + "name": "Magician", + "synopsis": "Magicians know magic and how to use it." + }, "$", { + "name": "defaultinit" + }], + "class_name": "MMethodDef", + "full_name": "test_prog$Magician$defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_intro": true, + "msignature": { + "arity": 3, + "mparameters": [{ + "is_vararg": false, + "name": "strength_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "endurance_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "intelligence_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }], + "return_mtype": null + } +} +{ + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "$", { + "name": "Alcoholic", + "synopsis": "Alcoholics are good to nothing escept taking punches." + }, "$", { + "name": "defaultinit" + }], + "class_name": "MMethodDef", + "full_name": "test_prog$Alcoholic$defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_intro": true, + "msignature": { + "arity": 3, + "mparameters": [{ + "is_vararg": false, + "name": "strength_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "endurance_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "intelligence_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }], + "return_mtype": null + } +} +{ "name": "_base_strength", "synopsis": "Used to represents how strong the race is.", "namespace": [{ @@ -1207,57 +1521,241 @@ } } { - "name": "base_intelligence", - "synopsis": "Is this race smart?", + "name": "base_intelligence", + "synopsis": "Is this race smart?", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "$", { + "name": "Race", + "synopsis": "Race determines basic characteristics and what the character will be able to do in life." + }, "$", { + "name": "base_intelligence", + "synopsis": "Is this race smart?" + }], + "class_name": "MMethodDef", + "full_name": "test_prog$Race$base_intelligence", + "visibility": "public", + "html_synopsis": "Is this race smart?", + "modifiers": ["fun"], + "is_intro": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + } +} +{ + "name": "base_intelligence=", + "synopsis": "Is this race smart?", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "$", { + "name": "Race", + "synopsis": "Race determines basic characteristics and what the character will be able to do in life." + }, "$", { + "name": "base_intelligence=", + "synopsis": "Is this race smart?" + }], + "class_name": "MMethodDef", + "full_name": "test_prog$Race$base_intelligence=", + "visibility": "protected", + "html_synopsis": "Is this race smart?", + "modifiers": ["protected", "fun"], + "is_intro": true, + "msignature": { + "arity": 1, + "mparameters": [{ + "is_vararg": false, + "name": "base_intelligence", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }], + "return_mtype": null + } +} +{ + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "$", { + "name": "Race", + "synopsis": "Race determines basic characteristics and what the character will be able to do in life." + }, "$", { + "name": "defaultinit" + }], + "class_name": "MMethodDef", + "full_name": "test_prog$Race$defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_intro": true, + "msignature": { + "arity": 3, + "mparameters": [{ + "is_vararg": false, + "name": "base_strength", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "base_endurance", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "base_intelligence", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }], + "return_mtype": null + } +} +{ + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "$", { + "name": "Human", + "synopsis": "Humans are able to do everithing." + }, "$", { + "name": "defaultinit" + }], + "class_name": "MMethodDef", + "full_name": "test_prog$Human$defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_intro": true, + "msignature": { + "arity": 3, + "mparameters": [{ + "is_vararg": false, + "name": "base_strength", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "base_endurance", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "base_intelligence", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }], + "return_mtype": null + } +} +{ + "name": "defaultinit", "namespace": [{ "name": "test_prog", "synopsis": "Test program for model tools." }, "$", { - "name": "Race", - "synopsis": "Race determines basic characteristics and what the character will be able to do in life." + "name": "Dwarf", + "synopsis": "Dwarves make strong warriors." }, "$", { - "name": "base_intelligence", - "synopsis": "Is this race smart?" + "name": "defaultinit" }], "class_name": "MMethodDef", - "full_name": "test_prog$Race$base_intelligence", + "full_name": "test_prog$Dwarf$defaultinit", "visibility": "public", - "html_synopsis": "Is this race smart?", - "modifiers": ["fun"], + "modifiers": ["init"], "is_intro": true, "msignature": { - "arity": 0, - "mparameters": [], - "return_mtype": { - "name": "Int", - "synopsis": "Some services about Integers.", - "html_synopsis": "Some services about Integers." - } + "arity": 3, + "mparameters": [{ + "is_vararg": false, + "name": "base_strength", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "base_endurance", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "base_intelligence", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }], + "return_mtype": null } } { - "name": "base_intelligence=", - "synopsis": "Is this race smart?", + "name": "defaultinit", "namespace": [{ "name": "test_prog", "synopsis": "Test program for model tools." }, "$", { - "name": "Race", - "synopsis": "Race determines basic characteristics and what the character will be able to do in life." + "name": "Elf", + "synopsis": "Elves make good magicians." }, "$", { - "name": "base_intelligence=", - "synopsis": "Is this race smart?" + "name": "defaultinit" }], "class_name": "MMethodDef", - "full_name": "test_prog$Race$base_intelligence=", - "visibility": "protected", - "html_synopsis": "Is this race smart?", - "modifiers": ["protected", "fun"], + "full_name": "test_prog$Elf$defaultinit", + "visibility": "public", + "modifiers": ["init"], "is_intro": true, "msignature": { - "arity": 1, + "arity": 3, "mparameters": [{ "is_vararg": false, + "name": "base_strength", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "base_endurance", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, "name": "base_intelligence", "mtype": { "name": "Int", @@ -1902,6 +2400,60 @@ } } { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "$", { + "name": "Character", + "synopsis": "Characters can be played by both the human or the machine." + }, "$", { + "name": "defaultinit" + }], + "class_name": "MMethodDef", + "full_name": "test_prog$Character$defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_intro": true, + "msignature": { + "arity": 4, + "mparameters": [{ + "is_vararg": false, + "name": "race", + "mtype": { + "name": "Race", + "synopsis": "Race determines basic characteristics and what the character will be able to do in life.", + "html_synopsis": "Race determines basic characteristics and what the character will be able to do in life." + } + }, { + "is_vararg": false, + "name": "name", + "mtype": { + "name": "String", + "synopsis": "Strings (there is no chars...).", + "html_synopsis": "Strings (there is no chars...)." + } + }, { + "is_vararg": false, + "name": "age", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "sex", + "mtype": { + "name": "Bool", + "synopsis": "Booleans, `true` or `false`.", + "html_synopsis": "Booleans, true or false." + } + }], + "return_mtype": null + } +} +{ "name": "dps", "synopsis": "Damage per second inflicted by this weapon.", "namespace": [{ @@ -1965,6 +2517,28 @@ } } { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "$", { + "name": "Weapon", + "synopsis": "Something that can be used to attack someone and inflict damage." + }, "$", { + "name": "defaultinit" + }], + "class_name": "MMethodDef", + "full_name": "test_prog$Weapon$defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_intro": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ "name": "hit_points", "namespace": [{ "name": "test_prog", @@ -2181,6 +2755,28 @@ } } { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "$", { + "name": "Combatable", + "synopsis": "Something that can be combatted, it can `attack` and `defend`." + }, "$", { + "name": "defaultinit" + }], + "class_name": "MMethodDef", + "full_name": "test_prog$Combatable$defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_intro": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ "name": "player_characters", "synopsis": "Characters played by human players.", "namespace": [{ @@ -2487,6 +3083,28 @@ } } { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "$", { + "name": "Game", + "synopsis": "This is the interface you have to implement to use ure gaming platform." + }, "$", { + "name": "defaultinit" + }], + "class_name": "MMethodDef", + "full_name": "test_prog$Game$defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_intro": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ "name": "_player_characters", "namespace": [{ "name": "test_prog", @@ -2591,6 +3209,28 @@ } } { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "$", { + "name": "MyGame", + "synopsis": "This is an example of how to implement the Game interface" + }, "$", { + "name": "defaultinit" + }], + "class_name": "MMethodDef", + "full_name": "test_prog$MyGame$defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_intro": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ "name": "start", "namespace": [{ "name": "test_prog", @@ -2612,6 +3252,27 @@ } } { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "$", { + "name": "Starter" + }, "$", { + "name": "defaultinit" + }], + "class_name": "MMethodDef", + "full_name": "test_prog$Starter$defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_intro": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ "name": "_player_characters", "namespace": [{ "name": "test_prog", @@ -2662,6 +3323,27 @@ } } { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "$", { + "name": "TestGame" + }, "$", { + "name": "defaultinit" + }], + "class_name": "MMethodDef", + "full_name": "test_prog$TestGame$defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_intro": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ "name": "test_game", "namespace": [{ "name": "test_prog", @@ -2682,3 +3364,24 @@ "return_mtype": null } } +{ + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "$", { + "name": "GameTest" + }, "$", { + "name": "defaultinit" + }], + "class_name": "MMethodDef", + "full_name": "test_prog$GameTest$defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_intro": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} diff --git a/src/doc/templates/tests/test_json_model.sav/test_props_to_full_json.res b/src/doc/templates/tests/test_json_model.sav/test_props_to_full_json.res index 09644aa..4b49e79 100644 --- a/src/doc/templates/tests/test_json_model.sav/test_props_to_full_json.res +++ b/src/doc/templates/tests/test_json_model.sav/test_props_to_full_json.res @@ -117,6 +117,28 @@ } } { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "Object", + "synopsis": "Root of everything." + }, "::", { + "name": "defaultinit" + }], + "class_name": "MMethod", + "full_name": "test_prog::Object::defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_init": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ "name": "unary -", "namespace": [{ "name": "test_prog", @@ -332,6 +354,28 @@ } } { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "Int", + "synopsis": "Some services about Integers." + }, "::", { + "name": "defaultinit" + }], + "class_name": "MMethod", + "full_name": "test_prog::Int::defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_init": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ "name": "+", "namespace": [{ "name": "test_prog", @@ -497,6 +541,94 @@ } } { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "Float", + "synopsis": "Some services about Floats." + }, "::", { + "name": "defaultinit" + }], + "class_name": "MMethod", + "full_name": "test_prog::Float::defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_init": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "Bool", + "synopsis": "Booleans, `true` or `false`." + }, "::", { + "name": "defaultinit" + }], + "class_name": "MMethod", + "full_name": "test_prog::Bool::defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_init": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "String", + "synopsis": "Strings (there is no chars...)." + }, "::", { + "name": "defaultinit" + }], + "class_name": "MMethod", + "full_name": "test_prog::String::defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_init": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "List", + "synopsis": "List of things." + }, "::", { + "name": "defaultinit" + }], + "class_name": "MMethod", + "full_name": "test_prog::List::defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_init": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ "name": "main", "namespace": [{ "name": "test_prog", @@ -518,6 +650,28 @@ } } { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "Sys", + "synopsis": "Sys" + }, "::", { + "name": "defaultinit" + }], + "class_name": "MMethod", + "full_name": "test_prog::Sys::defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_init": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ "name": "_strength_bonus", "namespace": [{ "name": "test_prog", @@ -752,6 +906,190 @@ } } { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "Career", + "synopsis": "A `Career` gives a characteristic bonus or malus to the character." + }, "::", { + "name": "defaultinit" + }], + "class_name": "MMethod", + "full_name": "test_prog::Career::defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_init": true, + "msignature": { + "arity": 3, + "mparameters": [{ + "is_vararg": false, + "name": "strength_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "endurance_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "intelligence_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }], + "return_mtype": null + } +} +{ + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "Warrior", + "synopsis": "Warriors are good for fighting." + }, "::", { + "name": "defaultinit" + }], + "class_name": "MMethod", + "full_name": "test_prog::Warrior::defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_init": true, + "msignature": { + "arity": 3, + "mparameters": [{ + "is_vararg": false, + "name": "strength_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "endurance_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "intelligence_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }], + "return_mtype": null + } +} +{ + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "Magician", + "synopsis": "Magicians know magic and how to use it." + }, "::", { + "name": "defaultinit" + }], + "class_name": "MMethod", + "full_name": "test_prog::Magician::defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_init": true, + "msignature": { + "arity": 3, + "mparameters": [{ + "is_vararg": false, + "name": "strength_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "endurance_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "intelligence_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }], + "return_mtype": null + } +} +{ + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "Alcoholic", + "synopsis": "Alcoholics are good to nothing escept taking punches." + }, "::", { + "name": "defaultinit" + }], + "class_name": "MMethod", + "full_name": "test_prog::Alcoholic::defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_init": true, + "msignature": { + "arity": 3, + "mparameters": [{ + "is_vararg": false, + "name": "strength_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "endurance_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "intelligence_bonus", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }], + "return_mtype": null + } +} +{ "name": "_base_strength", "synopsis": "Used to represents how strong the race is.", "namespace": [{ @@ -953,55 +1291,239 @@ } } { - "name": "base_intelligence", - "synopsis": "Is this race smart?", + "name": "base_intelligence", + "synopsis": "Is this race smart?", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "Race", + "synopsis": "Race determines basic characteristics and what the character will be able to do in life." + }, "::", { + "name": "base_intelligence", + "synopsis": "Is this race smart?" + }], + "class_name": "MMethod", + "full_name": "test_prog::Race::base_intelligence", + "visibility": "public", + "html_synopsis": "Is this race smart?", + "modifiers": ["fun"], + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + } +} +{ + "name": "base_intelligence=", + "synopsis": "Is this race smart?", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "Race", + "synopsis": "Race determines basic characteristics and what the character will be able to do in life." + }, "::", { + "name": "base_intelligence=", + "synopsis": "Is this race smart?" + }], + "class_name": "MMethod", + "full_name": "test_prog::Race::base_intelligence=", + "visibility": "protected", + "html_synopsis": "Is this race smart?", + "modifiers": ["protected", "fun"], + "msignature": { + "arity": 1, + "mparameters": [{ + "is_vararg": false, + "name": "base_intelligence", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }], + "return_mtype": null + } +} +{ + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "Race", + "synopsis": "Race determines basic characteristics and what the character will be able to do in life." + }, "::", { + "name": "defaultinit" + }], + "class_name": "MMethod", + "full_name": "test_prog::Race::defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_init": true, + "msignature": { + "arity": 3, + "mparameters": [{ + "is_vararg": false, + "name": "base_strength", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "base_endurance", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "base_intelligence", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }], + "return_mtype": null + } +} +{ + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "Human", + "synopsis": "Humans are able to do everithing." + }, "::", { + "name": "defaultinit" + }], + "class_name": "MMethod", + "full_name": "test_prog::Human::defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_init": true, + "msignature": { + "arity": 3, + "mparameters": [{ + "is_vararg": false, + "name": "base_strength", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "base_endurance", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "base_intelligence", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }], + "return_mtype": null + } +} +{ + "name": "defaultinit", "namespace": [{ "name": "test_prog", "synopsis": "Test program for model tools." }, "::", { - "name": "Race", - "synopsis": "Race determines basic characteristics and what the character will be able to do in life." + "name": "Dwarf", + "synopsis": "Dwarves make strong warriors." }, "::", { - "name": "base_intelligence", - "synopsis": "Is this race smart?" + "name": "defaultinit" }], "class_name": "MMethod", - "full_name": "test_prog::Race::base_intelligence", + "full_name": "test_prog::Dwarf::defaultinit", "visibility": "public", - "html_synopsis": "Is this race smart?", - "modifiers": ["fun"], + "modifiers": ["init"], + "is_init": true, "msignature": { - "arity": 0, - "mparameters": [], - "return_mtype": { - "name": "Int", - "synopsis": "Some services about Integers.", - "html_synopsis": "Some services about Integers." - } + "arity": 3, + "mparameters": [{ + "is_vararg": false, + "name": "base_strength", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "base_endurance", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "base_intelligence", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }], + "return_mtype": null } } { - "name": "base_intelligence=", - "synopsis": "Is this race smart?", + "name": "defaultinit", "namespace": [{ "name": "test_prog", "synopsis": "Test program for model tools." }, "::", { - "name": "Race", - "synopsis": "Race determines basic characteristics and what the character will be able to do in life." + "name": "Elf", + "synopsis": "Elves make good magicians." }, "::", { - "name": "base_intelligence=", - "synopsis": "Is this race smart?" + "name": "defaultinit" }], "class_name": "MMethod", - "full_name": "test_prog::Race::base_intelligence=", - "visibility": "protected", - "html_synopsis": "Is this race smart?", - "modifiers": ["protected", "fun"], + "full_name": "test_prog::Elf::defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_init": true, "msignature": { - "arity": 1, + "arity": 3, "mparameters": [{ "is_vararg": false, + "name": "base_strength", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "base_endurance", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, "name": "base_intelligence", "mtype": { "name": "Int", @@ -1641,6 +2163,60 @@ } } { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "Character", + "synopsis": "Characters can be played by both the human or the machine." + }, "::", { + "name": "defaultinit" + }], + "class_name": "MMethod", + "full_name": "test_prog::Character::defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_init": true, + "msignature": { + "arity": 4, + "mparameters": [{ + "is_vararg": false, + "name": "race", + "mtype": { + "name": "Race", + "synopsis": "Race determines basic characteristics and what the character will be able to do in life.", + "html_synopsis": "Race determines basic characteristics and what the character will be able to do in life." + } + }, { + "is_vararg": false, + "name": "name", + "mtype": { + "name": "String", + "synopsis": "Strings (there is no chars...).", + "html_synopsis": "Strings (there is no chars...)." + } + }, { + "is_vararg": false, + "name": "age", + "mtype": { + "name": "Int", + "synopsis": "Some services about Integers.", + "html_synopsis": "Some services about Integers." + } + }, { + "is_vararg": false, + "name": "sex", + "mtype": { + "name": "Bool", + "synopsis": "Booleans, `true` or `false`.", + "html_synopsis": "Booleans, true or false." + } + }], + "return_mtype": null + } +} +{ "name": "dps", "synopsis": "Damage per second inflicted by this weapon.", "namespace": [{ @@ -1669,6 +2245,28 @@ } } { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "Weapon", + "synopsis": "Something that can be used to attack someone and inflict damage." + }, "::", { + "name": "defaultinit" + }], + "class_name": "MMethod", + "full_name": "test_prog::Weapon::defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_init": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ "name": "hit_points", "namespace": [{ "name": "test_prog", @@ -1846,6 +2444,28 @@ } } { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "Combatable", + "synopsis": "Something that can be combatted, it can `attack` and `defend`." + }, "::", { + "name": "defaultinit" + }], + "class_name": "MMethod", + "full_name": "test_prog::Combatable::defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_init": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ "name": "player_characters", "synopsis": "Characters played by human players.", "namespace": [{ @@ -1974,6 +2594,28 @@ } } { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "Game", + "synopsis": "This is the interface you have to implement to use ure gaming platform." + }, "::", { + "name": "defaultinit" + }], + "class_name": "MMethod", + "full_name": "test_prog::Game::defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_init": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ "name": "_player_characters", "namespace": [{ "name": "test_prog", @@ -2078,6 +2720,28 @@ } } { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "MyGame", + "synopsis": "This is an example of how to implement the Game interface" + }, "::", { + "name": "defaultinit" + }], + "class_name": "MMethod", + "full_name": "test_prog::MyGame::defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_init": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ "name": "start", "namespace": [{ "name": "test_prog", @@ -2098,6 +2762,27 @@ } } { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "Starter" + }, "::", { + "name": "defaultinit" + }], + "class_name": "MMethod", + "full_name": "test_prog::Starter::defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_init": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ "name": "_player_characters", "namespace": [{ "name": "test_prog", @@ -2148,6 +2833,27 @@ } } { + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "TestGame" + }, "::", { + "name": "defaultinit" + }], + "class_name": "MMethod", + "full_name": "test_prog::TestGame::defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_init": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} +{ "name": "test_game", "namespace": [{ "name": "test_prog", @@ -2167,3 +2873,24 @@ "return_mtype": null } } +{ + "name": "defaultinit", + "namespace": [{ + "name": "test_prog", + "synopsis": "Test program for model tools." + }, "::", { + "name": "GameTest" + }, "::", { + "name": "defaultinit" + }], + "class_name": "MMethod", + "full_name": "test_prog::GameTest::defaultinit", + "visibility": "public", + "modifiers": ["init"], + "is_init": true, + "msignature": { + "arity": 0, + "mparameters": [], + "return_mtype": null + } +} diff --git a/src/doc/templates/tests/test_md_commands.sav/test_cmd_call.res b/src/doc/templates/tests/test_md_commands.sav/test_cmd_call.res index 3ed3eb0..91c5ae8 100644 --- a/src/doc/templates/tests/test_md_commands.sav/test_cmd_call.res +++ b/src/doc/templates/tests/test_md_commands.sav/test_cmd_call.res @@ -1,2 +1,2 @@ -* `character$Character$init` +* `character$Character$defaultinit` * `character$Character$total_strengh` - The actual strength of the character. diff --git a/src/doc/templates/tests/test_md_commands.sav/test_cmd_features.res b/src/doc/templates/tests/test_md_commands.sav/test_cmd_features.res index cfabfc6..9d0a142 100644 --- a/src/doc/templates/tests/test_md_commands.sav/test_cmd_features.res +++ b/src/doc/templates/tests/test_md_commands.sav/test_cmd_features.res @@ -1,6 +1,7 @@ * `_endurance_bonus` * `_intelligence_bonus` * `_strength_bonus` +* `defaultinit` * `endurance_bonus` * `endurance_bonus=` * `careers$Career$init` diff --git a/src/doc/templates/tests/test_md_commands.sav/test_cmd_lin.res b/src/doc/templates/tests/test_md_commands.sav/test_cmd_lin.res index 4f36fb0..c7b37e8 100644 --- a/src/doc/templates/tests/test_md_commands.sav/test_cmd_lin.res +++ b/src/doc/templates/tests/test_md_commands.sav/test_cmd_lin.res @@ -6,5 +6,4 @@ * `careers$Warrior$init` * `careers$Magician$init` * `careers$Alcoholic$init` -* `character$Character$init` * `races$Dwarf$init` diff --git a/src/doc/term/tests/test_term.sav/test_call.res b/src/doc/term/tests/test_term.sav/test_call.res index ac3c732..0947bc2 100644 --- a/src/doc/term/tests/test_term.sav/test_call.res +++ b/src/doc/term/tests/test_term.sav/test_call.res @@ -1,7 +1,7 @@ Methods calling `test_prog::Career::endurance_bonus`: - * test_prog$Character$Object::init - redef init init(race: Race, name: String, age: Int, sex: Bool) + + test_prog$Character$defaultinit + init defaultinit(race: Race, name: String, age: Int, sex: Bool) test_location + test_prog$Character$total_endurance diff --git a/src/doc/term/tests/test_term.sav/test_lin.res b/src/doc/term/tests/test_term.sav/test_lin.res index 23e94dc..532b2e3 100644 --- a/src/doc/term/tests/test_term.sav/test_lin.res +++ b/src/doc/term/tests/test_term.sav/test_lin.res @@ -5,6 +5,6 @@ Linearization for `test_prog::Object::init`: test_location * test_prog$Race$Object::init - redef init init(base_strength: Int, base_endurance: Int, base_intelligence: Int) + redef init init test_location diff --git a/src/doc/term/tests/test_term.sav/test_term_catalog_stats.res b/src/doc/term/tests/test_term.sav/test_term_catalog_stats.res index c8a157d..47521e8 100644 --- a/src/doc/term/tests/test_term.sav/test_term_catalog_stats.res +++ b/src/doc/term/tests/test_term.sav/test_term_catalog_stats.res @@ -1,7 +1,7 @@ Catalog statistics: * 2 packages * 11 modules - * 79 methods + * 101 methods * 26 classes * 509 lines of code * 6 contributors diff --git a/tests/base_attr_nullable.nit b/tests/base_attr_nullable.nit index ae29324..112f86b 100644 --- a/tests/base_attr_nullable.nit +++ b/tests/base_attr_nullable.nit @@ -26,7 +26,6 @@ end class Integer var val: Int - init(val: Int) do _val = val fun output do _val.output end diff --git a/tests/base_init_super_call2.nit b/tests/base_init_super_call2.nit index be64735..0f2988b 100644 --- a/tests/base_init_super_call2.nit +++ b/tests/base_init_super_call2.nit @@ -40,7 +40,10 @@ end class C1 super A - init(j: Int) do + init(j: Int) + is + old_style_init + do super j.output end @@ -48,7 +51,10 @@ end class D1 super A - init(j: Int) do + init(j: Int) + is + old_style_init + do super j.output end @@ -56,7 +62,10 @@ end class E1 super A - init(j: Bool) do + init(j: Bool) + is + old_style_init + do super(8)#alt4#super j.output end @@ -64,7 +73,10 @@ end class C2 super A - init(j: Int) do + init(j: Int) + is + old_style_init + do super(j) j.output end @@ -72,7 +84,10 @@ end class D2 super A - init(j: Int) do + init(j: Int) + is + old_style_init + do super(j) j.output end @@ -80,7 +95,10 @@ end class E2 super A - init(j: Bool) do + init(j: Bool) + is + old_style_init + do super(11)#alt5#super(j) j.output end @@ -88,7 +106,10 @@ end class C3 super A - init(j: Int) do + init(j: Int) + is + old_style_init + do super(j)#alt6# j.output end @@ -96,7 +117,10 @@ end class D3 super A - init(j: Int) do + init(j: Int) + is + old_style_init + do super(j)#alt6# j.output end @@ -104,7 +128,10 @@ end class E3 super A - init(j: Bool) do + init(j: Bool) + is + old_style_init + do super(14)#alt6# j.output end @@ -112,7 +139,10 @@ end class F1 super A - init(j: Int, k: Bool) do + init(j: Int, k: Bool) + is + old_style_init + do super j.output end @@ -120,7 +150,10 @@ end class F2 super A - init(j: Int, k: Bool) do + init(j: Int, k: Bool) + is + old_style_init + do super(j)#alt6# j.output end diff --git a/tests/base_simple3.nit b/tests/base_simple3.nit index 8bb2bc8..6515ef7 100644 --- a/tests/base_simple3.nit +++ b/tests/base_simple3.nit @@ -33,11 +33,7 @@ end class B var val: Int - init(v: Int) - do - 7.output - self.val = v - end + init do 7.output fun run do val.output end diff --git a/tests/error_defs_init.nit b/tests/error_defs_init.nit index adff5f2..710fe07 100644 --- a/tests/error_defs_init.nit +++ b/tests/error_defs_init.nit @@ -16,18 +16,18 @@ import kernel class A #1alt1#init do abort - #1alt2#init(a: Int) do abort + #1alt2#init(a: Int) is old_style_init do abort #1alt3#new do abort #1alt4#new(c: Int) do abort - #1alt5#init foo(a: Int) do abort + #1alt5#init foo(a: Int) is old_style_init do abort #1alt6#new foo(c: Int) do abort #1alt7#fun foo do end #alt1#init do abort - #alt2#init(b: Float) do abort + #alt2#init(b: Float)is old_style_init do abort #alt3#new do abort #alt4#new(d: Float) do abort - #alt5#init foo(a: Float) do abort + #alt5#init foo(a: Float)is old_style_init do abort #alt6#new foo(c: Float) do abort #alt7#fun foo do end end diff --git a/tests/sav/base_arg_default_autoinit_alt1.res b/tests/sav/base_arg_default_autoinit_alt1.res index 9b7862e..df31aac 100644 --- a/tests/sav/base_arg_default_autoinit_alt1.res +++ b/tests/sav/base_arg_default_autoinit_alt1.res @@ -1,9 +1,9 @@ -alt/base_arg_default_autoinit_alt1.nit:59,5--7: Error: expected at least 1 argument(s) for `autoinit(mandatory: Int, optional: nullable Int)`; got 0. See introduction at `base_arg_default_autoinit_alt1::A::autoinit`. -alt/base_arg_default_autoinit_alt1.nit:68,5--7: Error: expected 2 argument(s) for `autoinit(mandatory: Int, optional: nullable Int)`; got 3. See introduction at `base_arg_default_autoinit_alt1::A::autoinit`. -alt/base_arg_default_autoinit_alt1.nit:71,5--7: Error: expected 4 argument(s) for `autoinit(mandatory: Int, optional: nullable Int, optional_b: nullable Int, mandatory_b: Int)`; got 1. See introduction at `base_arg_default_autoinit_alt1::B::autoinit`. -alt/base_arg_default_autoinit_alt1.nit:74,5--7: Error: expected 4 argument(s) for `autoinit(mandatory: Int, optional: nullable Int, optional_b: nullable Int, mandatory_b: Int)`; got 2. See introduction at `base_arg_default_autoinit_alt1::B::autoinit`. -alt/base_arg_default_autoinit_alt1.nit:77,5--7: Error: expected 4 argument(s) for `autoinit(mandatory: Int, optional: nullable Int, optional_b: nullable Int, mandatory_b: Int)`; got 3. See introduction at `base_arg_default_autoinit_alt1::B::autoinit`. -alt/base_arg_default_autoinit_alt1.nit:83,5--7: Error: expected 4 argument(s) for `autoinit(mandatory: Int, optional: nullable Int, optional_b: nullable Int, mandatory_b: Int)`; got 5. See introduction at `base_arg_default_autoinit_alt1::B::autoinit`. -alt/base_arg_default_autoinit_alt1.nit:86,5--7: Error: expected 3 argument(s) for `autoinit(optional_b: nullable Int, mandatory_b: Int, mandatory: Int)`; got 1. See introduction at `base_arg_default_autoinit_alt1::C::autoinit`. -alt/base_arg_default_autoinit_alt1.nit:89,5--7: Error: expected 3 argument(s) for `autoinit(optional_b: nullable Int, mandatory_b: Int, mandatory: Int)`; got 2. See introduction at `base_arg_default_autoinit_alt1::C::autoinit`. -alt/base_arg_default_autoinit_alt1.nit:95,5--7: Error: expected 3 argument(s) for `autoinit(optional_b: nullable Int, mandatory_b: Int, mandatory: Int)`; got 4. See introduction at `base_arg_default_autoinit_alt1::C::autoinit`. +alt/base_arg_default_autoinit_alt1.nit:59,5--7: Error: expected at least 1 argument(s) for `defaultinit(mandatory: Int, optional: nullable Int)`; got 0. See introduction at `base_arg_default_autoinit_alt1::A::defaultinit`. +alt/base_arg_default_autoinit_alt1.nit:68,5--7: Error: expected 2 argument(s) for `defaultinit(mandatory: Int, optional: nullable Int)`; got 3. See introduction at `base_arg_default_autoinit_alt1::A::defaultinit`. +alt/base_arg_default_autoinit_alt1.nit:71,5--7: Error: expected 4 argument(s) for `defaultinit(mandatory: Int, optional, optional_b: nullable Int, mandatory_b: Int)`; got 1. See introduction at `base_arg_default_autoinit_alt1::B::defaultinit`. +alt/base_arg_default_autoinit_alt1.nit:74,5--7: Error: expected 4 argument(s) for `defaultinit(mandatory: Int, optional, optional_b: nullable Int, mandatory_b: Int)`; got 2. See introduction at `base_arg_default_autoinit_alt1::B::defaultinit`. +alt/base_arg_default_autoinit_alt1.nit:77,5--7: Error: expected 4 argument(s) for `defaultinit(mandatory: Int, optional, optional_b: nullable Int, mandatory_b: Int)`; got 3. See introduction at `base_arg_default_autoinit_alt1::B::defaultinit`. +alt/base_arg_default_autoinit_alt1.nit:83,5--7: Error: expected 4 argument(s) for `defaultinit(mandatory: Int, optional, optional_b: nullable Int, mandatory_b: Int)`; got 5. See introduction at `base_arg_default_autoinit_alt1::B::defaultinit`. +alt/base_arg_default_autoinit_alt1.nit:86,5--7: Error: expected 3 argument(s) for `defaultinit(optional_b: nullable Int, mandatory_b, mandatory: Int)`; got 1. See introduction at `base_arg_default_autoinit_alt1::C::defaultinit`. +alt/base_arg_default_autoinit_alt1.nit:89,5--7: Error: expected 3 argument(s) for `defaultinit(optional_b: nullable Int, mandatory_b, mandatory: Int)`; got 2. See introduction at `base_arg_default_autoinit_alt1::C::defaultinit`. +alt/base_arg_default_autoinit_alt1.nit:95,5--7: Error: expected 3 argument(s) for `defaultinit(optional_b: nullable Int, mandatory_b, mandatory: Int)`; got 4. See introduction at `base_arg_default_autoinit_alt1::C::defaultinit`. diff --git a/tests/sav/base_attr_annot_1alt1.res b/tests/sav/base_attr_annot_1alt1.res index 8367aba..55e832d 100644 --- a/tests/sav/base_attr_annot_1alt1.res +++ b/tests/sav/base_attr_annot_1alt1.res @@ -1 +1 @@ -alt/base_attr_annot_1alt1.nit:33,9--11: Error: expected 0 argument(s) for `autoinit`; got 1. See introduction at `base_attr_annot_1alt1::B::autoinit`. +alt/base_attr_annot_1alt1.nit:33,9--11: Error: expected 0 argument(s) for `defaultinit`; got 1. See introduction at `base_attr_annot_1alt1::B::defaultinit`. diff --git a/tests/sav/base_attr_annot_alt1.res b/tests/sav/base_attr_annot_alt1.res index 862450e..7b33360 100644 --- a/tests/sav/base_attr_annot_alt1.res +++ b/tests/sav/base_attr_annot_alt1.res @@ -1 +1 @@ -alt/base_attr_annot_alt1.nit:33,9--11: Error: expected 1 argument(s) for `autoinit(a: Object)`; got 0. See introduction at `base_attr_annot_alt1::B::autoinit`. +alt/base_attr_annot_alt1.nit:33,9--11: Error: expected 1 argument(s) for `defaultinit(a: Object)`; got 0. See introduction at `base_attr_annot_alt1::B::defaultinit`. diff --git a/tests/sav/base_attr_nullable_alt1.res b/tests/sav/base_attr_nullable_alt1.res index c7cab54..60c2eaf 100644 --- a/tests/sav/base_attr_nullable_alt1.res +++ b/tests/sav/base_attr_nullable_alt1.res @@ -1 +1 @@ -Runtime error: Uninitialized attribute _a1 (alt/base_attr_nullable_alt1.nit:38) +Runtime error: Uninitialized attribute _a1 (alt/base_attr_nullable_alt1.nit:37) diff --git a/tests/sav/base_attr_nullable_alt2.res b/tests/sav/base_attr_nullable_alt2.res index d238261..46a38b1 100644 --- a/tests/sav/base_attr_nullable_alt2.res +++ b/tests/sav/base_attr_nullable_alt2.res @@ -1,2 +1,2 @@ -Runtime error: Uninitialized attribute _a2 (alt/base_attr_nullable_alt2.nit:39) +Runtime error: Uninitialized attribute _a2 (alt/base_attr_nullable_alt2.nit:38) 1 diff --git a/tests/sav/base_attr_nullable_alt3.res b/tests/sav/base_attr_nullable_alt3.res index b6f38c8..a725723 100644 --- a/tests/sav/base_attr_nullable_alt3.res +++ b/tests/sav/base_attr_nullable_alt3.res @@ -1 +1 @@ -Runtime error: Uninitialized attribute _a1 (alt/base_attr_nullable_alt3.nit:64) +Runtime error: Uninitialized attribute _a1 (alt/base_attr_nullable_alt3.nit:63) diff --git a/tests/sav/base_attr_nullable_alt4.res b/tests/sav/base_attr_nullable_alt4.res index 1a98ce8..7ab0b21 100644 --- a/tests/sav/base_attr_nullable_alt4.res +++ b/tests/sav/base_attr_nullable_alt4.res @@ -1,2 +1,2 @@ -Runtime error: Uninitialized attribute _a2 (alt/base_attr_nullable_alt4.nit:45) +Runtime error: Uninitialized attribute _a2 (alt/base_attr_nullable_alt4.nit:44) 10 diff --git a/tests/sav/base_attr_nullable_alt5.res b/tests/sav/base_attr_nullable_alt5.res index 891e424..eadaa67 100644 --- a/tests/sav/base_attr_nullable_alt5.res +++ b/tests/sav/base_attr_nullable_alt5.res @@ -1,3 +1,3 @@ -Runtime error: Uninitialized attribute _a3 (alt/base_attr_nullable_alt5.nit:66) +Runtime error: Uninitialized attribute _a3 (alt/base_attr_nullable_alt5.nit:65) 10 20 diff --git a/tests/sav/base_init_basic_alt3.res b/tests/sav/base_init_basic_alt3.res index f7e3b6d..971fe14 100644 --- a/tests/sav/base_init_basic_alt3.res +++ b/tests/sav/base_init_basic_alt3.res @@ -1,2 +1,2 @@ -alt/base_init_basic_alt3.nit:47,7: Error: cannot generate automatic init for class F. Conflict in the order in inherited initializers base_init_basic_alt3$D$autoinit(c=, b=) and base_init_basic_alt3$E$autoinit(c=, e=). Use `autoinit` to order initializers. eg `autoinit c=, e=, b=` -alt/base_init_basic_alt3.nit:54,7: Error: cannot generate automatic init for class G. Conflict in the order in inherited initializers base_init_basic_alt3$D$autoinit(c=, b=) and base_init_basic_alt3$E$autoinit(c=, e=). Use `autoinit` to order initializers. eg `autoinit c=, e=, b=, g=` +alt/base_init_basic_alt3.nit:47,7: Error: cannot generate automatic init for class F. Conflict in the order in inherited initializers base_init_basic_alt3$E$defaultinit(c=, e=) and base_init_basic_alt3$D$defaultinit(c=, b=). Use `autoinit` to order initializers. eg `autoinit c=, b=, e=` +alt/base_init_basic_alt3.nit:54,7: Error: cannot generate automatic init for class G. Conflict in the order in inherited initializers base_init_basic_alt3$E$defaultinit(c=, e=) and base_init_basic_alt3$D$defaultinit(c=, b=). Use `autoinit` to order initializers. eg `autoinit c=, b=, e=, g=` diff --git a/tests/sav/base_init_basic_alt5.res b/tests/sav/base_init_basic_alt5.res index 028bbf0..565d4e7 100644 --- a/tests/sav/base_init_basic_alt5.res +++ b/tests/sav/base_init_basic_alt5.res @@ -1 +1 @@ -alt/base_init_basic_alt5.nit:79,9--11: Error: expected 2 argument(s) for `autoinit(c: Int, b: Int)`; got 1. See introduction at `base_init_basic_alt5::D::autoinit`. +alt/base_init_basic_alt5.nit:79,9--11: Error: expected 2 argument(s) for `defaultinit(c, b: Int)`; got 1. See introduction at `base_init_basic_alt5::D::defaultinit`. diff --git a/tests/sav/base_init_combine_alt1.res b/tests/sav/base_init_combine_alt1.res index 65cf7fb..d9b9b04 100644 --- a/tests/sav/base_init_combine_alt1.res +++ b/tests/sav/base_init_combine_alt1.res @@ -1 +1 @@ -alt/base_init_combine_alt1.nit:59,9--11: Error: expected 2 argument(s) for `autoinit(i: Int, z: Int)`; got 1. See introduction at `base_init_combine_alt1::F::autoinit`. +alt/base_init_combine_alt1.nit:59,9--11: Error: expected 2 argument(s) for `defaultinit(i, z: Int)`; got 1. See introduction at `base_init_combine_alt1::F::defaultinit`. diff --git a/tests/sav/base_init_noinit_alt4.res b/tests/sav/base_init_noinit_alt4.res index 2cc2d16..5d7df60 100644 --- a/tests/sav/base_init_noinit_alt4.res +++ b/tests/sav/base_init_noinit_alt4.res @@ -1 +1 @@ -alt/base_init_noinit_alt4.nit:30,3--5: Error: expected 0 argument(s) for `autoinit`; got 1. See introduction at `base_init_noinit_alt4::A::autoinit`. +alt/base_init_noinit_alt4.nit:30,3--5: Error: expected 0 argument(s) for `defaultinit`; got 1. See introduction at `base_init_noinit_alt4::A::defaultinit`. diff --git a/tests/sav/base_init_super_call2_alt3.res b/tests/sav/base_init_super_call2_alt3.res index bdec82b..9245c89 100644 --- a/tests/sav/base_init_super_call2_alt3.res +++ b/tests/sav/base_init_super_call2_alt3.res @@ -1,27 +1 @@ -1 -2 -3 -4 -0 -6 -6 -7 -7 -true -8 -9 -9 -10 -10 -true -11 -12 -12 -13 -13 -true -14 -15 -15 -16 -16 +alt/base_init_super_call2_alt3.nit:38,2--5: Error: cannot do an implicit constructor call to `base_init_super_call2_alt3$A$defaultinit(i: Int)`. Expected at least `1` arguments. diff --git a/tests/sav/base_init_super_call2_alt4.res b/tests/sav/base_init_super_call2_alt4.res index 823de40..eeb33c5 100644 --- a/tests/sav/base_init_super_call2_alt4.res +++ b/tests/sav/base_init_super_call2_alt4.res @@ -1 +1 @@ -alt/base_init_super_call2_alt4.nit:60,3--7: Type Error: expected argument #0 of type `Int`, got implicit argument `j` of type `Bool`. Signature is (i: Int) +alt/base_init_super_call2_alt4.nit:69,3--7: Type Error: expected argument #0 of type `Int`, got implicit argument `j` of type `Bool`. Signature is (i: Int) diff --git a/tests/sav/base_init_super_call2_alt5.res b/tests/sav/base_init_super_call2_alt5.res index b6e45c9..7fd2621 100644 --- a/tests/sav/base_init_super_call2_alt5.res +++ b/tests/sav/base_init_super_call2_alt5.res @@ -1 +1 @@ -alt/base_init_super_call2_alt5.nit:84,9: Type Error: expected `Int`, got `Bool`. +alt/base_init_super_call2_alt5.nit:102,9: Type Error: expected `Int`, got `Bool`. diff --git a/tests/sav/base_init_super_call2_alt6.res b/tests/sav/base_init_super_call2_alt6.res index ae5b7bd..0d1abc9 100644 --- a/tests/sav/base_init_super_call2_alt6.res +++ b/tests/sav/base_init_super_call2_alt6.res @@ -1,27 +1 @@ -1 -2 -3 -4 -5 -6 -6 -7 -7 -true -8 -9 -9 -10 -10 -true -11 -12 -0 -13 -0 -true -0 -15 -15 -16 -0 +alt/base_init_super_call2_alt6.nit:131,2--5: Type Error: expected argument #0 of type `Int`, got implicit argument `i` of type `Bool`. Signature is (i: Int) diff --git a/tests/sav/base_init_super_call_alt3.res b/tests/sav/base_init_super_call_alt3.res index 138108b..4adff4b 100644 --- a/tests/sav/base_init_super_call_alt3.res +++ b/tests/sav/base_init_super_call_alt3.res @@ -1,23 +1 @@ -1 -2 -3 -4 -6 -6 -7 -7 -8 -true -9 -9 -10 -10 -11 -true -12 -13 -14 -true -15 -15 -16 +alt/base_init_super_call_alt3.nit:38,2--5: Error: cannot do an implicit constructor call to `base_init_super_call_alt3$A$defaultinit(i: Int)`. Expected at least `1` arguments. diff --git a/tests/sav/base_new_alt8.res b/tests/sav/base_new_alt8.res index 880abb6..a0517ba 100644 --- a/tests/sav/base_new_alt8.res +++ b/tests/sav/base_new_alt8.res @@ -1 +1,2 @@ +alt/base_new_alt8.nit:91,2--4: Error: ambiguous property name `defaultinit` for `Int`; conflict between core::Numeric::defaultinit and core::Discrete::defaultinit. alt/base_new_alt8.nit:91,2--8: Type Error: cannot instantiate enum `Int`. diff --git a/tests/sav/base_vararg_mult_alt1.res b/tests/sav/base_vararg_mult_alt1.res index 1326dca..b9c7f9d 100644 --- a/tests/sav/base_vararg_mult_alt1.res +++ b/tests/sav/base_vararg_mult_alt1.res @@ -1,3 +1,3 @@ -alt/base_vararg_mult_alt1.nit:40,5--7: Error: expected at least 1 argument(s) for `autoinit(ints: Int...)`; got 0. See introduction at `base_vararg_mult_alt1::A::autoinit`. -alt/base_vararg_mult_alt1.nit:47,5--7: Error: expected 2 argument(s) for `autoinit(ints: Int..., objs: Object...)`; got 3. See introduction at `base_vararg_mult_alt1::B::autoinit`. +alt/base_vararg_mult_alt1.nit:40,5--7: Error: expected at least 1 argument(s) for `defaultinit(ints: Int...)`; got 0. See introduction at `base_vararg_mult_alt1::A::defaultinit`. +alt/base_vararg_mult_alt1.nit:47,5--7: Error: expected 2 argument(s) for `defaultinit(ints: Int..., objs: Object...)`; got 3. See introduction at `base_vararg_mult_alt1::B::defaultinit`. alt/base_vararg_mult_alt1.nit:48,11--18: Type Error: expected `Int`, got `Array[Int]`. Is an ellipsis `...` missing on the argument? diff --git a/tests/sav/error_class_glob.res b/tests/sav/error_class_glob.res index 0a541aa..5c09788 100644 --- a/tests/sav/error_class_glob.res +++ b/tests/sav/error_class_glob.res @@ -1,13 +1,2 @@ -../lib/core/kernel.nit:32,1--225,3: Error: `kernel$Object` does not specialize `module_0$Object`. Possible duplication of the root class `Object`? -../lib/core/kernel.nit:227,1--300,3: Error: `kernel$Sys` does not specialize `module_0$Object`. Possible duplication of the root class `Object`? -../lib/core/kernel.nit:313,1--371,3: Error: `kernel$Comparable` does not specialize `module_0$Object`. Possible duplication of the root class `Object`? -../lib/core/kernel.nit:373,1--410,3: Error: `kernel$Discrete` does not specialize `module_0$Object`. Possible duplication of the root class `Object`? -../lib/core/kernel.nit:412,1--429,3: Error: `kernel$Cloneable` does not specialize `module_0$Object`. Possible duplication of the root class `Object`? -../lib/core/kernel.nit:431,1--486,3: Error: `kernel$Numeric` does not specialize `module_0$Object`. Possible duplication of the root class `Object`? -../lib/core/kernel.nit:492,1--515,3: Error: `kernel$Bool` does not specialize `module_0$Object`. Possible duplication of the root class `Object`? -../lib/core/kernel.nit:517,1--599,3: Error: `kernel$Float` does not specialize `module_0$Object`. Possible duplication of the root class `Object`? -../lib/core/kernel.nit:601,1--700,3: Error: `kernel$Byte` does not specialize `module_0$Object`. Possible duplication of the root class `Object`? -../lib/core/kernel.nit:702,1--886,3: Error: `kernel$Int` does not specialize `module_0$Object`. Possible duplication of the root class `Object`? -../lib/core/kernel.nit:888,1--1067,3: Error: `kernel$Char` does not specialize `module_0$Object`. Possible duplication of the root class `Object`? -../lib/core/kernel.nit:1069,1--1086,3: Error: `kernel$Pointer` does not specialize `module_0$Object`. Possible duplication of the root class `Object`? -../lib/core/kernel.nit:1088,1--1097,3: Error: `kernel$Task` does not specialize `module_0$Object`. Possible duplication of the root class `Object`? +../lib/core/collection/hash_collection.nit:275,3--6: Possible duplication of the root class `Object` +../lib/core/collection/hash_collection.nit:473,3--6: Possible duplication of the root class `Object` diff --git a/tests/sav/error_defs_init_1alt2_alt2.res b/tests/sav/error_defs_init_1alt2_alt2.res index dc81300..b0df7ca 100644 --- a/tests/sav/error_defs_init_1alt2_alt2.res +++ b/tests/sav/error_defs_init_1alt2_alt2.res @@ -1 +1 @@ -alt/error_defs_init_1alt2_alt2.nit:27,2--5: Error: a property `autoinit` is already defined in class `A` at line 18. +alt/error_defs_init_1alt2_alt2.nit:27,2--5: Error: a property `defaultinit` is already defined in class `A` at line 18. diff --git a/tests/sav/error_init_auto.res b/tests/sav/error_init_auto.res index 33413fe..b4fea22 100644 --- a/tests/sav/error_init_auto.res +++ b/tests/sav/error_init_auto.res @@ -1,4 +1,4 @@ -error_init_auto.nit:34,5--7: Error: expected 1 argument(s) for `autoinit(x: Int)`; got 0. See introduction at `error_init_auto::A::autoinit`. -error_init_auto.nit:36,5--7: Error: expected 1 argument(s) for `autoinit(x: Int)`; got 2. See introduction at `error_init_auto::A::autoinit`. -error_init_auto.nit:37,5--7: Error: expected 1 argument(s) for `autoinit(x: Int)`; got 3. See introduction at `error_init_auto::A::autoinit`. +error_init_auto.nit:34,5--7: Error: expected 1 argument(s) for `defaultinit(x: Int)`; got 0. See introduction at `error_init_auto::A::defaultinit`. +error_init_auto.nit:36,5--7: Error: expected 1 argument(s) for `defaultinit(x: Int)`; got 2. See introduction at `error_init_auto::A::defaultinit`. +error_init_auto.nit:37,5--7: Error: expected 1 argument(s) for `defaultinit(x: Int)`; got 3. See introduction at `error_init_auto::A::defaultinit`. error_init_auto.nit:38,11--13: Error: method `foo` does not exists in `A`. diff --git a/tests/sav/error_init_auto_alt1.res b/tests/sav/error_init_auto_alt1.res index 2041c75..390923a 100644 --- a/tests/sav/error_init_auto_alt1.res +++ b/tests/sav/error_init_auto_alt1.res @@ -1,4 +1,4 @@ -alt/error_init_auto_alt1.nit:35,5--7: Error: expected 0 argument(s) for `autoinit`; got 1. See introduction at `error_init_auto_alt1::A::autoinit`. -alt/error_init_auto_alt1.nit:36,5--7: Error: expected 0 argument(s) for `autoinit`; got 2. See introduction at `error_init_auto_alt1::A::autoinit`. -alt/error_init_auto_alt1.nit:37,5--7: Error: expected 0 argument(s) for `autoinit`; got 3. See introduction at `error_init_auto_alt1::A::autoinit`. +alt/error_init_auto_alt1.nit:35,5--7: Error: expected 0 argument(s) for `defaultinit`; got 1. See introduction at `error_init_auto_alt1::A::defaultinit`. +alt/error_init_auto_alt1.nit:36,5--7: Error: expected 0 argument(s) for `defaultinit`; got 2. See introduction at `error_init_auto_alt1::A::defaultinit`. +alt/error_init_auto_alt1.nit:37,5--7: Error: expected 0 argument(s) for `defaultinit`; got 3. See introduction at `error_init_auto_alt1::A::defaultinit`. alt/error_init_auto_alt1.nit:38,11--13: Error: method `foo` does not exists in `A`. diff --git a/tests/sav/error_init_auto_alt2.res b/tests/sav/error_init_auto_alt2.res index 6026026..d43fffd 100644 --- a/tests/sav/error_init_auto_alt2.res +++ b/tests/sav/error_init_auto_alt2.res @@ -1,4 +1,4 @@ -alt/error_init_auto_alt2.nit:34,5--7: Error: expected 2 argument(s) for `autoinit(x, y: Int)`; got 0. See introduction at `error_init_auto_alt2::A::autoinit`. -alt/error_init_auto_alt2.nit:35,5--7: Error: expected 2 argument(s) for `autoinit(x, y: Int)`; got 1. See introduction at `error_init_auto_alt2::A::autoinit`. -alt/error_init_auto_alt2.nit:37,5--7: Error: expected 2 argument(s) for `autoinit(x, y: Int)`; got 3. See introduction at `error_init_auto_alt2::A::autoinit`. +alt/error_init_auto_alt2.nit:34,5--7: Error: expected 2 argument(s) for `defaultinit(x, y: Int)`; got 0. See introduction at `error_init_auto_alt2::A::defaultinit`. +alt/error_init_auto_alt2.nit:35,5--7: Error: expected 2 argument(s) for `defaultinit(x, y: Int)`; got 1. See introduction at `error_init_auto_alt2::A::defaultinit`. +alt/error_init_auto_alt2.nit:37,5--7: Error: expected 2 argument(s) for `defaultinit(x, y: Int)`; got 3. See introduction at `error_init_auto_alt2::A::defaultinit`. alt/error_init_auto_alt2.nit:38,11--13: Error: method `foo` does not exists in `A`. diff --git a/tests/sav/error_init_auto_alt3.res b/tests/sav/error_init_auto_alt3.res index a1a8ba6..8a30015 100644 --- a/tests/sav/error_init_auto_alt3.res +++ b/tests/sav/error_init_auto_alt3.res @@ -1,4 +1,4 @@ -alt/error_init_auto_alt3.nit:34,5--7: Error: expected 1 argument(s) for `autoinit(xx: Int)`; got 0. See introduction at `error_init_auto_alt3::A::autoinit`. -alt/error_init_auto_alt3.nit:36,5--7: Error: expected 1 argument(s) for `autoinit(xx: Int)`; got 2. See introduction at `error_init_auto_alt3::A::autoinit`. -alt/error_init_auto_alt3.nit:37,5--7: Error: expected 1 argument(s) for `autoinit(xx: Int)`; got 3. See introduction at `error_init_auto_alt3::A::autoinit`. +alt/error_init_auto_alt3.nit:34,5--7: Error: expected 1 argument(s) for `defaultinit(xx: Int)`; got 0. See introduction at `error_init_auto_alt3::A::defaultinit`. +alt/error_init_auto_alt3.nit:36,5--7: Error: expected 1 argument(s) for `defaultinit(xx: Int)`; got 2. See introduction at `error_init_auto_alt3::A::defaultinit`. +alt/error_init_auto_alt3.nit:37,5--7: Error: expected 1 argument(s) for `defaultinit(xx: Int)`; got 3. See introduction at `error_init_auto_alt3::A::defaultinit`. alt/error_init_auto_alt3.nit:38,11--13: Error: method `foo` does not exists in `A`. diff --git a/tests/sav/error_init_auto_alt4.res b/tests/sav/error_init_auto_alt4.res index d625cd9..8d39276 100644 --- a/tests/sav/error_init_auto_alt4.res +++ b/tests/sav/error_init_auto_alt4.res @@ -1,3 +1,3 @@ -alt/error_init_auto_alt4.nit:34,5--7: Error: expected 1 argument(s) for `autoinit(x: Int)`; got 0. See introduction at `error_init_auto_alt4::A::autoinit`. -alt/error_init_auto_alt4.nit:36,5--7: Error: expected 1 argument(s) for `autoinit(x: Int)`; got 2. See introduction at `error_init_auto_alt4::A::autoinit`. -alt/error_init_auto_alt4.nit:37,5--7: Error: expected 1 argument(s) for `autoinit(x: Int)`; got 3. See introduction at `error_init_auto_alt4::A::autoinit`. +alt/error_init_auto_alt4.nit:34,5--7: Error: expected 1 argument(s) for `defaultinit(x: Int)`; got 0. See introduction at `error_init_auto_alt4::A::defaultinit`. +alt/error_init_auto_alt4.nit:36,5--7: Error: expected 1 argument(s) for `defaultinit(x: Int)`; got 2. See introduction at `error_init_auto_alt4::A::defaultinit`. +alt/error_init_auto_alt4.nit:37,5--7: Error: expected 1 argument(s) for `defaultinit(x: Int)`; got 3. See introduction at `error_init_auto_alt4::A::defaultinit`. diff --git a/tests/sav/nitcatalog_args1.res b/tests/sav/nitcatalog_args1.res index 040f43c..6cca568 100644 --- a/tests/sav/nitcatalog_args1.res +++ b/tests/sav/nitcatalog_args1.res @@ -84,7 +84,7 @@

Quality

Tags

@@ -95,7 +95,7 @@ none

Contributors

diff --git a/tests/sav/nitdoc_args1.res b/tests/sav/nitdoc_args1.res index a7326d6..7fd3669 100644 --- a/tests/sav/nitdoc_args1.res +++ b/tests/sav/nitdoc_args1.res @@ -1,13 +1,13 @@ Parsing code... Generating documentation pages... Documentation produced in `out/nitdoc_args1.write` -Generated 22/22 pages +Generated 27/27 pages PageHome: 1 PageMPackage: 2 PageMGroup: 2 PageMModule: 2 PageMClass: 5 - PageMProperty: 10 + PageMProperty: 15 PagePerson: 0 PageTag: 0 class_module_95d0_58d_58dInt.html @@ -25,15 +25,20 @@ module_module_95d0_58d_58dmodule_95d0.html module_module_95d1_58d_58dmodule_95d1.html package_module_95d0.html package_module_95d1.html +property_module_95d0_58d_58dInt_58d_58ddefaultinit.html +property_module_95d0_58d_58dObject_58d_58ddefaultinit.html property_module_95d0_58d_58dObject_58d_58dinit.html property_module_95d0_58d_58dObject_58d_58doutput.html property_module_95d0_58d_58dObject_58d_58dprint.html +property_module_95d0_58d_58dSys_58d_58ddefaultinit.html property_module_95d0_58d_58dSys_58d_58dmain.html property_module_95d1_58d_58dA_58d_58da1.html property_module_95d1_58d_58dA_58d_58da12.html property_module_95d1_58d_58dA_58d_58da123.html property_module_95d1_58d_58dA_58d_58da13.html +property_module_95d1_58d_58dA_58d_58ddefaultinit.html property_module_95d1_58d_58dB_58d_58dall2.html property_module_95d1_58d_58dB_58d_58dall25.html +property_module_95d1_58d_58dB_58d_58ddefaultinit.html quicksearch-list.js vendors/ diff --git a/tests/sav/nitdoc_args2.res b/tests/sav/nitdoc_args2.res index 268190c..6d7fcc3 100644 --- a/tests/sav/nitdoc_args2.res +++ b/tests/sav/nitdoc_args2.res @@ -1,13 +1,13 @@ Parsing code... Generating documentation pages... Documentation produced in `out/nitdoc_args2.write` -Generated 28/28 pages +Generated 31/31 pages PageHome: 1 PageMPackage: 1 PageMGroup: 1 PageMModule: 1 PageMClass: 7 - PageMProperty: 17 + PageMProperty: 20 PagePerson: 0 PageTag: 0 class_base_attr_nullable_58d_58dBar.html @@ -26,19 +26,22 @@ module_base_attr_nullable_58d_58dbase_attr_nullable.html package_base_attr_nullable.html property_base_attr_nullable_58d_58dBar_58d_58da3.html property_base_attr_nullable_58d_58dBar_58d_58da3_61d.html +property_base_attr_nullable_58d_58dBar_58d_58ddefaultinit.html property_base_attr_nullable_58d_58dFoo_58d_58da1.html property_base_attr_nullable_58d_58dFoo_58d_58da1_61d.html property_base_attr_nullable_58d_58dFoo_58d_58da2.html property_base_attr_nullable_58d_58dFoo_58d_58da2_61d.html +property_base_attr_nullable_58d_58dFoo_58d_58ddefaultinit.html property_base_attr_nullable_58d_58dFoo_58d_58dnop.html property_base_attr_nullable_58d_58dFoo_58d_58drun.html property_base_attr_nullable_58d_58dFoo_58d_58drun_other.html property_base_attr_nullable_58d_58dInt_58d_58d_43d.html property_base_attr_nullable_58d_58dInt_58d_58doutput.html -property_base_attr_nullable_58d_58dInteger_58d_58dinit.html +property_base_attr_nullable_58d_58dInteger_58d_58ddefaultinit.html property_base_attr_nullable_58d_58dInteger_58d_58doutput.html property_base_attr_nullable_58d_58dInteger_58d_58dval.html property_base_attr_nullable_58d_58dInteger_58d_58dval_61d.html +property_base_attr_nullable_58d_58dObject_58d_58ddefaultinit.html property_base_attr_nullable_58d_58dObject_58d_58dinit.html property_base_attr_nullable_58d_58dSys_58d_58dmain.html quicksearch-list.js diff --git a/tests/sav/nitdoc_args3.res b/tests/sav/nitdoc_args3.res index 105d27c..c61e127 100644 --- a/tests/sav/nitdoc_args3.res +++ b/tests/sav/nitdoc_args3.res @@ -1,13 +1,13 @@ Parsing code... Generating documentation pages... Documentation produced in `out/nitdoc_args3.write` -Generated 28/28 pages +Generated 31/31 pages PageHome: 1 PageMPackage: 1 PageMGroup: 1 PageMModule: 1 PageMClass: 7 - PageMProperty: 17 + PageMProperty: 20 PagePerson: 0 PageTag: 0 class_base_attr_nullable_58d_58dBar.html @@ -26,19 +26,22 @@ module_base_attr_nullable_58d_58dbase_attr_nullable.html package_base_attr_nullable.html property_base_attr_nullable_58d_58dBar_58d_58da3.html property_base_attr_nullable_58d_58dBar_58d_58da3_61d.html +property_base_attr_nullable_58d_58dBar_58d_58ddefaultinit.html property_base_attr_nullable_58d_58dFoo_58d_58da1.html property_base_attr_nullable_58d_58dFoo_58d_58da1_61d.html property_base_attr_nullable_58d_58dFoo_58d_58da2.html property_base_attr_nullable_58d_58dFoo_58d_58da2_61d.html +property_base_attr_nullable_58d_58dFoo_58d_58ddefaultinit.html property_base_attr_nullable_58d_58dFoo_58d_58dnop.html property_base_attr_nullable_58d_58dFoo_58d_58drun.html property_base_attr_nullable_58d_58dFoo_58d_58drun_other.html property_base_attr_nullable_58d_58dInt_58d_58d_43d.html property_base_attr_nullable_58d_58dInt_58d_58doutput.html -property_base_attr_nullable_58d_58dInteger_58d_58dinit.html +property_base_attr_nullable_58d_58dInteger_58d_58ddefaultinit.html property_base_attr_nullable_58d_58dInteger_58d_58doutput.html property_base_attr_nullable_58d_58dInteger_58d_58dval.html property_base_attr_nullable_58d_58dInteger_58d_58dval_61d.html +property_base_attr_nullable_58d_58dObject_58d_58ddefaultinit.html property_base_attr_nullable_58d_58dObject_58d_58dinit.html property_base_attr_nullable_58d_58dSys_58d_58dmain.html quicksearch-list.js diff --git a/tests/sav/nitdoc_args4.res b/tests/sav/nitdoc_args4.res index 3be4a55..dfe20dd 100644 --- a/tests/sav/nitdoc_args4.res +++ b/tests/sav/nitdoc_args4.res @@ -1,11 +1,11 @@ Parsing code... Generating documentation pages... -Generated 111/111 pages +Generated 134/134 pages PageHome: 1 PageMPackage: 2 PageMGroup: 7 PageMModule: 10 PageMClass: 22 - PageMProperty: 61 + PageMProperty: 84 PagePerson: 6 PageTag: 2 diff --git a/tests/sav/nitlight_args1.res b/tests/sav/nitlight_args1.res index e7f3ab8..feb5de0 100644 --- a/tests/sav/nitlight_args1.res +++ b/tests/sav/nitlight_args1.res @@ -33,35 +33,31 @@ class B var val: Int - init(v: Int) - do - 7.output - self.val = v - end - fun run do val.output -end - -class C - var val1: Int - var val2: Int = 10 -end + init do 7.output + fun run do val.output +end + +class C + var val1: Int + var val2: Int = 10 +end + +fun foo do 2.output +fun bar(i: Int) do i.output +fun baz: Int do return 4 -fun foo do 2.output -fun bar(i: Int) do i.output -fun baz: Int do return 4 - -1.output -foo -bar(3) -baz.output - -var a = new A -a.run - -var b = new B(8) -b.run - -var c = new C(9) -c.val1.output -c.val2.output +1.output +foo +bar(3) +baz.output + +var a = new A +a.run + +var b = new B(8) +b.run + +var c = new C(9) +c.val1.output +c.val2.output \ No newline at end of file diff --git a/tests/sav/nitlight_args2.res b/tests/sav/nitlight_args2.res index 204c980..a4316b9 100644 --- a/tests/sav/nitlight_args2.res +++ b/tests/sav/nitlight_args2.res @@ -73,37 +73,33 @@ class B var val: Int - init(v: Int) - do - 7.output - self.val = v - end - fun run do val.output -end - -class C - var val1: Int - var val2: Int = 10 -end + init do 7.output + fun run do val.output +end + +class C + var val1: Int + var val2: Int = 10 +end + +fun foo do 2.output +fun bar(i: Int) do i.output +fun baz: Int do return 4 -fun foo do 2.output -fun bar(i: Int) do i.output -fun baz: Int do return 4 - -1.output -foo -bar(3) -baz.output - -var a = new A -a.run - -var b = new B(8) -b.run - -var c = new C(9) -c.val1.output -c.val2.output +1.output +foo +bar(3) +baz.output + +var a = new A +a.run + +var b = new B(8) +b.run + +var c = new C(9) +c.val1.output +c.val2.output \ No newline at end of file diff --git a/tests/sav/nitlight_args3.res b/tests/sav/nitlight_args3.res index f1c2d87..af3ce32 100644 --- a/tests/sav/nitlight_args3.res +++ b/tests/sav/nitlight_args3.res @@ -1,10 +1,10 @@ - 7.output - self.val = v - end - fun run do val.output -end - -class C - var val1: Int - var val2: Int = 10 - \ No newline at end of file +end + +class C + var val1: Int + var val2: Int = 10 +end + +fun foo do 2.output +fun bar(i: Int) do i.output + \ No newline at end of file diff --git a/tests/sav/nitlight_args4.res b/tests/sav/nitlight_args4.res index 8bb2bc8..6515ef7 100644 --- a/tests/sav/nitlight_args4.res +++ b/tests/sav/nitlight_args4.res @@ -33,11 +33,7 @@ end class B var val: Int - init(v: Int) - do - 7.output - self.val = v - end + init do 7.output fun run do val.output end diff --git a/tests/sav/nitlight_args5.res b/tests/sav/nitlight_args5.res index 90f6ed3..7b59e9a 100644 --- a/tests/sav/nitlight_args5.res +++ b/tests/sav/nitlight_args5.res @@ -73,37 +73,33 @@ class B var val: Int - init(v: Int) - do - 7.output - self.val = v - end - fun run do val.output -end - -class C - var val1: Int - var val2: Int = 10 -end + init do 7.output + fun run do val.output +end + +class C + var val1: Int + var val2: Int = 10 +end + +fun foo do 2.output +fun bar(i: Int) do i.output +fun baz: Int do return 4 -fun foo do 2.output -fun bar(i: Int) do i.output -fun baz: Int do return 4 - -1.output -foo -bar(3) -baz.output - -var a = new A -a.run - -var b = new B(8) -b.run - -var c = new C(9) -c.val1.output -c.val2.output +1.output +foo +bar(3) +baz.output + +var a = new A +a.run + +var b = new B(8) +b.run + +var c = new C(9) +c.val1.output +c.val2.output \ No newline at end of file diff --git a/tests/sav/nitmetrics_args1.res b/tests/sav/nitmetrics_args1.res index 4d641a6..29e31bd 100644 --- a/tests/sav/nitmetrics_args1.res +++ b/tests/sav/nitmetrics_args1.res @@ -1,74 +1,73 @@ *** METRICS *** --- AST Metrics --- ## All nodes of the AST - population: 52 + population: 49 minimum value: 1 - maximum value: 40 - total value: 304 - average value: 5.84 + maximum value: 37 + total value: 286 + average value: 5.83 distribution: - <=1: sub-population=16 (30.76%); cumulated value=16 (5.26%) - <=2: sub-population=5 (9.61%); cumulated value=10 (3.28%) - <=4: sub-population=9 (17.30%); cumulated value=28 (9.21%) - <=8: sub-population=12 (23.07%); cumulated value=76 (25.00%) - <=16: sub-population=5 (9.61%); cumulated value=59 (19.40%) - <=32: sub-population=4 (7.69%); cumulated value=75 (24.67%) - <=64: sub-population=1 (1.92%); cumulated value=40 (13.15%) + <=1: sub-population=15 (30.61%); cumulated value=15 (5.24%) + <=2: sub-population=3 (6.12%); cumulated value=6 (2.09%) + <=4: sub-population=12 (24.48%); cumulated value=40 (13.98%) + <=8: sub-population=10 (20.40%); cumulated value=67 (23.42%) + <=16: sub-population=4 (8.16%); cumulated value=48 (16.78%) + <=32: sub-population=4 (8.16%); cumulated value=73 (25.52%) + <=64: sub-population=1 (2.04%); cumulated value=37 (12.93%) list: - TId: 40 (13.15%) - APublicVisibility: 19 (6.25%) - AListExprs: 19 (6.25%) - AQid: 19 (6.25%) - ACallExpr: 18 (5.92%) - TClassid: 15 (4.93%) - AQclassid: 15 (4.93%) - TInteger: 10 (3.28%) - AIntegerExpr: 10 (3.28%) - AType: 9 (2.96%) + TId: 37 (12.93%) + APublicVisibility: 19 (6.64%) + ACallExpr: 18 (6.29%) + AQid: 18 (6.29%) + AListExprs: 18 (6.29%) + AQclassid: 14 (4.89%) + TClassid: 14 (4.89%) + TInteger: 10 (3.49%) + AIntegerExpr: 10 (3.49%) + ASignature: 8 (2.79%) ... - AAnnotation: 1 (0.32%) - AAnnotations: 1 (0.32%) - AReturnExpr: 1 (0.32%) - TKwreturn: 1 (0.32%) - AInterfaceClasskind: 1 (0.32%) - TKwinterface: 1 (0.32%) - ANoImport: 1 (0.32%) - AMainMethPropdef: 1 (0.32%) - AMainClassdef: 1 (0.32%) - TKwimport: 1 (0.32%) + TKwreturn: 1 (0.34%) + AAnnotation: 1 (0.34%) + AParam: 1 (0.34%) + AMainMethPropdef: 1 (0.34%) + AInterfaceClasskind: 1 (0.34%) + TKwinterface: 1 (0.34%) + ANoImport: 1 (0.34%) + ABlockExpr: 1 (0.34%) + AMainClassdef: 1 (0.34%) + TKwimport: 1 (0.34%) ## All identifiers of the AST - population: 20 + population: 19 minimum value: 1 maximum value: 11 - total value: 55 - average value: 2.75 + total value: 51 + average value: 2.68 distribution: - <=1: sub-population=3 (15.00%); cumulated value=3 (5.45%) - <=2: sub-population=12 (60.00%); cumulated value=24 (43.63%) - <=4: sub-population=3 (15.00%); cumulated value=10 (18.18%) - <=8: sub-population=1 (5.00%); cumulated value=7 (12.72%) - <=16: sub-population=1 (5.00%); cumulated value=11 (20.00%) + <=1: sub-population=3 (15.78%); cumulated value=3 (5.88%) + <=2: sub-population=12 (63.15%); cumulated value=24 (47.05%) + <=4: sub-population=2 (10.52%); cumulated value=7 (13.72%) + <=8: sub-population=1 (5.26%); cumulated value=6 (11.76%) + <=16: sub-population=1 (5.26%); cumulated value=11 (21.56%) list: - output: 11 (20.00%) - Int: 7 (12.72%) - run: 4 (7.27%) - c: 3 (5.45%) - val: 3 (5.45%) - i: 2 (3.63%) - bar: 2 (3.63%) - foo: 2 (3.63%) - val2: 2 (3.63%) - val1: 2 (3.63%) - C: 2 (3.63%) - v: 2 (3.63%) - baz: 2 (3.63%) - a: 2 (3.63%) - A: 2 (3.63%) - B: 2 (3.63%) - b: 2 (3.63%) - intern: 1 (1.81%) - Object: 1 (1.81%) - Bool: 1 (1.81%) + output: 11 (21.56%) + Int: 6 (11.76%) + run: 4 (7.84%) + c: 3 (5.88%) + baz: 2 (3.92%) + i: 2 (3.92%) + bar: 2 (3.92%) + val2: 2 (3.92%) + val1: 2 (3.92%) + C: 2 (3.92%) + val: 2 (3.92%) + B: 2 (3.92%) + a: 2 (3.92%) + A: 2 (3.92%) + foo: 2 (3.92%) + b: 2 (3.92%) + intern: 1 (1.96%) + Object: 1 (1.96%) + Bool: 1 (1.96%) --- Detection of variance constraints on formal parameter types --- -- Generic classes -- list: @@ -221,41 +220,41 @@ Number of refined classes: 0 (0.00%) Average number of class refinments by classes: 0.00 Average number of class refinments by refined classes: na -Number of properties: 23 - Number of MAttribute: 3 (13.04%) - Number of MMethod: 20 (86.95%) +Number of properties: 21 + Number of MAttribute: 3 (14.28%) + Number of MMethod: 18 (85.71%) -Number of property definitions: 24 -Number of redefined properties: 1 (4.34%) -Average number of property redefinitions by property: 0.04 -Average number of property redefinitions by redefined property: 1.00 +Number of property definitions: 23 +Number of redefined properties: 1 (4.76%) +Average number of property redefinitions by property: 0.09 +Average number of property redefinitions by redefined property: 2.00 --- Explicit vs. Implicit Self --- -Total number of self: 5 -Total number of implicit self: 4 (80.00%) +Total number of self: 4 +Total number of implicit self: 4 (100.00%) --- Construction of tables --- Number of runtime classes: 6 (excluding interfaces and abstract classes) Average number of composing class definition by runtime class: 2.00 -Total size of tables (classes and instances): 33 (not including stuff like info for subtyping or call-next-method) -Average size of table by runtime class: 5.50 -Values never redefined: 27 (81.81%) +Total size of tables (classes and instances): 31 (not including stuff like info for subtyping or call-next-method) +Average size of table by runtime class: 5.16 +Values never redefined: 25 (80.64%) generating package_hierarchy.dot generating module_hierarchy.dot --- Metrics of the explitic static types --- -Total number of explicit static types: 9 +Total number of explicit static types: 8 Statistics of type usage: population: 4 minimum value: 1 - maximum value: 6 - total value: 9 - average value: 2.25 + maximum value: 5 + total value: 8 + average value: 2.00 distribution: - <=1: sub-population=3 (75.00%); cumulated value=3 (33.33%) - <=8: sub-population=1 (25.00%); cumulated value=6 (66.66%) + <=1: sub-population=3 (75.00%); cumulated value=3 (37.50%) + <=8: sub-population=1 (25.00%); cumulated value=5 (62.50%) list: - Int: 6 (66.66%) - C: 1 (11.11%) - B: 1 (11.11%) - A: 1 (11.11%) + Int: 5 (62.50%) + C: 1 (12.50%) + B: 1 (12.50%) + A: 1 (12.50%) # MClasses metrics @@ -292,11 +291,11 @@ Statistics of type usage: std: 0.926 sum: 6 cnbp: number of accessible properties (inherited + local) - avg: 5.0 + avg: 4.0 max: C (9) min: Object (2) - std: 2.268 - sum: 35 + std: 2.591 + sum: 33 cnba: number of accessible attributes (inherited + local) avg: 0.0 max: C (2) @@ -304,17 +303,17 @@ Statistics of type usage: std: 0.845 sum: 3 cnbi: number of accessible constructors (inherited + local) - avg: 1.0 - max: B (2) - min: Object (1) - std: 0.378 - sum: 8 + avg: 2.0 + max: A (3) + min: Object (2) + std: 0.655 + sum: 17 cnbm: number of accessible methods (inherited + local) - avg: 3.0 - max: B (5) - min: Object (1) - std: 1.773 - sum: 21 + avg: 4.0 + max: C (7) + min: Object (2) + std: 1.927 + sum: 30 cnbv: number of accessible virtual types (inherited + local) avg: 0.0 max: Object (0) @@ -324,15 +323,15 @@ Statistics of type usage: cnbip: number of introduced properties avg: 3.0 max: C (7) - min: Bool (1) - std: 2.0 - sum: 23 + min: Bool (0) + std: 2.268 + sum: 21 cnbrp: number of redefined properties avg: 0.0 max: A (1) min: Object (0) - std: 0.378 - sum: 1 + std: 0.535 + sum: 2 cnbhp: number of inherited properties avg: 1.0 max: Bool (2) @@ -372,11 +371,11 @@ Statistics of type usage: std: 0.926 sum: 6 cnbp: number of accessible properties (inherited + local) - avg: 5.0 + avg: 4.0 max: C (9) min: Object (2) - std: 2.268 - sum: 35 + std: 2.591 + sum: 33 cnba: number of accessible attributes (inherited + local) avg: 0.0 max: C (2) @@ -384,17 +383,17 @@ Statistics of type usage: std: 0.845 sum: 3 cnbi: number of accessible constructors (inherited + local) - avg: 1.0 - max: B (2) - min: Object (1) - std: 0.378 - sum: 8 + avg: 2.0 + max: A (3) + min: Object (2) + std: 0.655 + sum: 17 cnbm: number of accessible methods (inherited + local) - avg: 3.0 - max: B (5) - min: Object (1) - std: 1.773 - sum: 21 + avg: 4.0 + max: C (7) + min: Object (2) + std: 1.927 + sum: 30 cnbv: number of accessible virtual types (inherited + local) avg: 0.0 max: Object (0) @@ -404,15 +403,15 @@ Statistics of type usage: cnbip: number of introduced properties avg: 3.0 max: C (7) - min: Bool (1) - std: 2.0 - sum: 23 + min: Bool (0) + std: 2.268 + sum: 21 cnbrp: number of redefined properties avg: 0.0 max: A (1) min: Object (0) - std: 0.378 - sum: 1 + std: 0.535 + sum: 2 cnbhp: number of inherited properties avg: 1.0 max: Bool (2) @@ -738,26 +737,27 @@ Warning: no source file for `base_simple3` sum: 0.143 # Mendel metrics - large mclasses (threshold: 4.354) + large mclasses (threshold: 4.915) + B: 5 C: 5 - budding mclasses (threshold: 3.207) + budding mclasses (threshold: 3.231) C: 3.5 - blooming mclasses (threshold: 14.316) + blooming mclasses (threshold: 15.285) C: 17.5 --- Detection of the usage of covariance static type conformance --- -- Total -- - Kinds of the subtype - list: - primitive type: 6 (100.00%) - total: 6 + primitive type: 5 (100.00%) + total: 5 - Variance - list: - monomorph: 6 (100.00%) - total: 6 + monomorph: 5 (100.00%) + total: 5 - Classes of the subtype - list: - Int: 6 (100.00%) - total: 6 + Int: 5 (100.00%) + total: 5 -- On covariance only -- - Specific covariance case explanations - list: @@ -814,7 +814,7 @@ Warning: no source file for `base_simple3` cnbna: number of accessible nullable attributes (inherited + local) -- nothing sum: 0 --- Sends on Nullable Receiver --- -Total number of sends: 19 +Total number of sends: 18 Number of sends on a unsafe nullable receiver: 0 (0.00%) Number of sends on a safe nullable receiver: 0 (0.00%) Number of buggy sends (cannot determine the type of the receiver): 0 (0.00%) @@ -853,11 +853,11 @@ Number of buggy sends (cannot determine the type of the receiver): 0 (0.00%) std: 0.0 sum: 16 mnlmd: number of live method definitions in a mmodule - avg: 17.0 - max: base_simple3 (17) - min: base_simple3 (17) + avg: 18.0 + max: base_simple3 (18) + min: base_simple3 (18) std: 0.0 - sum: 17 + sum: 18 mnldd: number of dead method definitions in a mmodule avg: 0.0 max: base_simple3 (0) @@ -900,49 +900,49 @@ Number of buggy sends (cannot determine the type of the receiver): 0 (0.00%) sum: 0 ## Callsites -* 23 live callsites +* 21 live callsites MMethodDef locally designated (by number of CallSites) - population: 14 + population: 12 minimum value: 1 maximum value: 10 - total value: 23 - average value: 1.64 + total value: 21 + average value: 1.75 distribution: - <=1: sub-population=13 (92.85%); cumulated value=13 (56.52%) - <=16: sub-population=1 (7.14%); cumulated value=10 (43.47%) + <=1: sub-population=11 (91.66%); cumulated value=11 (52.38%) + <=16: sub-population=1 (8.33%); cumulated value=10 (47.61%) list: - base_simple3$Int$output: 10 (43.47%) - base_simple3$B$val: 1 (4.34%) - base_simple3$B$val=: 1 (4.34%) - base_simple3$Object$init: 1 (4.34%) - base_simple3$C$val2: 1 (4.34%) + base_simple3$Int$output: 10 (47.61%) + base_simple3$B$val: 1 (4.76%) + base_simple3$C$val2: 1 (4.76%) + base_simple3$C$val1: 1 (4.76%) + base_simple3$B$run: 1 (4.76%) ... - base_simple3$A$autoinit: 1 (4.34%) - base_simple3$Sys$baz: 1 (4.34%) - base_simple3$Sys$bar: 1 (4.34%) - base_simple3$Sys$foo: 1 (4.34%) - base_simple3$C$autoinit: 1 (4.34%) + base_simple3$A$defaultinit: 1 (4.76%) + base_simple3$Sys$baz: 1 (4.76%) + base_simple3$Sys$bar: 1 (4.76%) + base_simple3$Sys$foo: 1 (4.76%) + base_simple3$C$defaultinit: 1 (4.76%) MMethodDef possibly invoked at runtime (by number of CallSites) - population: 14 + population: 12 minimum value: 1 maximum value: 10 - total value: 23 - average value: 1.64 + total value: 21 + average value: 1.75 distribution: - <=1: sub-population=13 (92.85%); cumulated value=13 (56.52%) - <=16: sub-population=1 (7.14%); cumulated value=10 (43.47%) + <=1: sub-population=11 (91.66%); cumulated value=11 (52.38%) + <=16: sub-population=1 (8.33%); cumulated value=10 (47.61%) list: - base_simple3$Int$output: 10 (43.47%) - base_simple3$B$val: 1 (4.34%) - base_simple3$B$val=: 1 (4.34%) - base_simple3$Object$init: 1 (4.34%) - base_simple3$C$val2: 1 (4.34%) + base_simple3$Int$output: 10 (47.61%) + base_simple3$B$val: 1 (4.76%) + base_simple3$C$val2: 1 (4.76%) + base_simple3$C$val1: 1 (4.76%) + base_simple3$B$run: 1 (4.76%) ... - base_simple3$A$autoinit: 1 (4.34%) - base_simple3$Sys$baz: 1 (4.34%) - base_simple3$Sys$bar: 1 (4.34%) - base_simple3$Sys$foo: 1 (4.34%) - base_simple3$C$autoinit: 1 (4.34%) + base_simple3$A$defaultinit: 1 (4.76%) + base_simple3$Sys$baz: 1 (4.76%) + base_simple3$Sys$bar: 1 (4.76%) + base_simple3$Sys$foo: 1 (4.76%) + base_simple3$C$defaultinit: 1 (4.76%) class_hierarchy.dot classdef_hierarchy.dot inheritance/ diff --git a/tests/sav/nitsmells_args1.res b/tests/sav/nitsmells_args1.res index 6bf7b3d..251dd03 100644 --- a/tests/sav/nitsmells_args1.res +++ b/tests/sav/nitsmells_args1.res @@ -7,7 +7,7 @@ Long method: Average 1 lines -total_strengh has 2 lines -total_endurance has 2 lines -total_intelligence has 2 lines -Large class: 6 attributes and 18 methods (4.673A 6.923M Average) +Large class: 6 attributes and 18 methods (4.673A 6.858M Average) -------------------- Full name: test_prog$GameTest Location: test_prog/tests/test_game.nit:25,1--33,3 Feature envy: diff --git a/tests/sav/nitsmells_args3.res b/tests/sav/nitsmells_args3.res index 0ef08f3..972ccf1 100644 --- a/tests/sav/nitsmells_args3.res +++ b/tests/sav/nitsmells_args3.res @@ -2,4 +2,4 @@ --- Code Smells Metrics --- -------------------- Full name: TestNitsmells$LargeClass Location: TestNitsmells/LargeClass/largeclass.nit:20,1--55,3 -Large class: 18 attributes and 48 methods (17.515A 30.464M Average) +Large class: 18 attributes and 49 methods (17.515A 24.215M Average) diff --git a/tests/sav/nituml_args1.res b/tests/sav/nituml_args1.res index 019d380..8c7ce7d 100644 --- a/tests/sav/nituml_args1.res +++ b/tests/sav/nituml_args1.res @@ -13,10 +13,10 @@ digraph G { subgraph clusterbase_prot_sig2 { label = "base_prot_sig2" base_prot_sig2C [ - label = "{C|- _vpriA: nullable A\l- _vpriA2: A\l|- priA(a: A)\l- vpriA(): nullable A\l- vpriA=(vpriA: nullable A)\l- vpriA2(): A\l- vpriA2=(vpriA2: A)\l+ init()\l+ autoinit()\l}"color="#58B26A" + label = "{C|- _vpriA: nullable A\l- _vpriA2: A\l|- priA(a: A)\l- vpriA(): nullable A\l- vpriA=(vpriA: nullable A)\l- vpriA2(): A\l- vpriA2=(vpriA2: A)\l+ init()\l+ defaultinit()\l}"color="#58B26A" ] base_prot_sig2D [ - label = "{D|- _vpubA: nullable A\l- _vpriA: nullable A\l- _vpubA2: A\l- _vpriA2: A\l|- pubA(a: A)\l- priA(a: A)\l- vpubA(): nullable A\l- vpubA=(vpubA: nullable A)\l- vpriA(): nullable A\l- vpriA=(vpriA: nullable A)\l- vpubA2(): A\l- vpubA2=(vpubA2: A)\l- vpriA2(): A\l- vpriA2=(vpriA2: A)\l+ init()\l+ autoinit()\l}"color="#58B26A" + label = "{D|- _vpubA: nullable A\l- _vpriA: nullable A\l- _vpubA2: A\l- _vpriA2: A\l|- pubA(a: A)\l- priA(a: A)\l- vpubA(): nullable A\l- vpubA=(vpubA: nullable A)\l- vpriA(): nullable A\l- vpriA=(vpriA: nullable A)\l- vpubA2(): A\l- vpubA2=(vpubA2: A)\l- vpriA2(): A\l- vpriA2=(vpriA2: A)\l+ init()\l+ defaultinit()\l}"color="#58B26A" ] } } diff --git a/tests/sav/nituml_args2.res b/tests/sav/nituml_args2.res index 97b0b32..8fbab9b 100644 --- a/tests/sav/nituml_args2.res +++ b/tests/sav/nituml_args2.res @@ -13,7 +13,7 @@ digraph G { subgraph clusterbase_prot_sig2 { label = "base_prot_sig2" base_prot_sig2C [ - label = "{C||+ init()\l+ autoinit()\l}"color="#58B26A" + label = "{C||+ init()\l+ defaultinit()\l}"color="#58B26A" ] } } diff --git a/tests/sav/nituml_args3.res b/tests/sav/nituml_args3.res index 4e62b3e..e30a297 100644 --- a/tests/sav/nituml_args3.res +++ b/tests/sav/nituml_args3.res @@ -12,88 +12,88 @@ digraph G { fontsize = 8 ] Object [ - label = "{interface\nObject||+ object_id(): Int\l+ is_same_type(other: Object): Bool\l+ is_same_instance(other: nullable Object): Bool\l+ ==(other: nullable Object): Bool\l+ !=(other: nullable Object): Bool\l+ output()\l+ output_class_name()\l+ hash(): Int\l+ sys(): Sys\l+ init()\l+ autoinit()\l}" + label = "{interface\nObject||+ object_id(): Int\l+ is_same_type(other: Object): Bool\l+ is_same_instance(other: nullable Object): Bool\l+ ==(other: nullable Object): Bool\l+ !=(other: nullable Object): Bool\l+ output()\l+ output_class_name()\l+ hash(): Int\l+ sys(): Sys\l+ init()\l+ defaultinit()\l}" ] Sys [ - label = "{Sys||+ main()\l+ run()\l+ errno(): Int\l+ exit(exit_value: Int)\l+ autoinit()\l}" + label = "{Sys||+ main()\l+ run()\l+ errno(): Int\l+ exit(exit_value: Int)\l+ is_windows(): Bool\l+ defaultinit()\l}" ] Object -> Sys [dir=back arrowtail=open style=dashed]; Comparable [ - label = "{interface\nComparable||+ \<(other: OTHER): Bool\l+ \<=(other: OTHER): Bool\l+ \>=(other: OTHER): Bool\l+ \>(other: OTHER): Bool\l+ \<=\>(other: OTHER): Int\l+ is_between(c: OTHER, d: OTHER): Bool\l+ max(other: OTHER): OTHER\l+ min(c: OTHER): OTHER\l+ autoinit()\l}" + label = "{interface\nComparable||+ \<(other: OTHER): Bool\l+ \<=(other: OTHER): Bool\l+ \>=(other: OTHER): Bool\l+ \>(other: OTHER): Bool\l+ \<=\>(other: OTHER): Int\l+ is_between(c: OTHER, d: OTHER): Bool\l+ max(other: OTHER): OTHER\l+ min(c: OTHER): OTHER\l+ defaultinit()\l}" ] Object -> Comparable [dir=back arrowtail=open style=dashed]; Discrete [ - label = "{interface\nDiscrete||+ successor(i: Int): OTHER\l+ predecessor(i: Int): OTHER\l+ distance(d: OTHER): Int\l+ autoinit()\l}" + label = "{interface\nDiscrete||+ successor(i: Int): OTHER\l+ predecessor(i: Int): OTHER\l+ distance(d: OTHER): Int\l+ defaultinit()\l}" ] Comparable -> Discrete [dir=back arrowtail=open style=dashed]; Cloneable [ - label = "{interface\nCloneable||+ clone(): SELF\l+ autoinit()\l}" + label = "{interface\nCloneable||+ clone(): SELF\l+ defaultinit()\l}" ] Object -> Cloneable [dir=back arrowtail=open style=dashed]; Numeric [ - label = "{interface\nNumeric||+ +(i: OTHER): OTHER\l+ -(i: OTHER): OTHER\l+ unary -(): OTHER\l+ *(i: OTHER): OTHER\l+ /(i: OTHER): OTHER\l+ to_i(): Int\l+ to_f(): Float\l+ to_b(): Byte\l+ is_zero(): Bool\l+ zero(): OTHER\l+ value_of(val: Numeric): OTHER\l+ autoinit()\l}" + label = "{interface\nNumeric||+ +(i: OTHER): OTHER\l+ -(i: OTHER): OTHER\l+ unary -(): OTHER\l+ *(i: OTHER): OTHER\l+ /(i: OTHER): OTHER\l+ to_i(): Int\l+ to_f(): Float\l+ to_b(): Byte\l+ is_zero(): Bool\l+ zero(): OTHER\l+ value_of(val: Numeric): OTHER\l+ defaultinit()\l}" ] Comparable -> Numeric [dir=back arrowtail=open style=dashed]; Bool [ - label = "{Bool||+ to_i(): Int\l+ autoinit()\l}" + label = "{Bool||+ to_i(): Int\l}" ] Object -> Bool [dir=back arrowtail=open style=dashed]; Float [ - label = "{Float||+ is_approx(other: Float, precision: Float): Bool\l+ autoinit()\l}" + label = "{Float||+ is_approx(other: Float, precision: Float): Bool\l}" ] Numeric -> Float [dir=back arrowtail=open style=dashed]; Byte [ - label = "{Byte||+ %(i: Byte): Byte\l+ \<\<(i: Int): Byte\l+ \>\>(i: Int): Byte\l+ ascii(): Char\l+ is_whitespace(): Bool\l+ autoinit()\l}" + label = "{Byte||+ %(i: Byte): Byte\l+ \<\<(i: Int): Byte\l+ \>\>(i: Int): Byte\l+ is_whitespace(): Bool\l}" ] Discrete -> Byte [dir=back arrowtail=open style=dashed]; Numeric -> Byte [dir=back arrowtail=open style=dashed]; Int [ - label = "{Int||+ %(i: Int): Int\l+ \<\<(i: Int): Int\l+ \>\>(i: Int): Int\l+ code_point(): Char\l+ digit_count(b: Int): Int\l+ digit_count_base_10(): Int\l+ to_c(): Char\l+ abs(): Int\l+ autoinit()\l}" + label = "{Int||+ %(i: Int): Int\l+ \<\<(i: Int): Int\l+ \>\>(i: Int): Int\l+ code_point(): Char\l+ digit_count(b: Int): Int\l+ digit_count_base_10(): Int\l+ to_c(): Char\l+ abs(): Int\l+ is_whitespace(): Bool\l}" ] Discrete -> Int [dir=back arrowtail=open style=dashed]; Numeric -> Int [dir=back arrowtail=open style=dashed]; Char [ - label = "{Char||+ to_i(): Int\l+ ascii(): Byte\l+ code_point(): Int\l+ is_ascii(): Bool\l+ to_lower(): Char\l+ to_upper(): Char\l+ is_digit(): Bool\l+ is_lower(): Bool\l+ is_upper(): Bool\l+ is_letter(): Bool\l+ is_whitespace(): Bool\l+ autoinit()\l}" + label = "{Char||+ +(i: Int): Char\l+ -(i: Int): Char\l+ to_i(): Int\l+ code_point(): Int\l+ is_ascii(): Bool\l+ to_lower(): Char\l+ to_upper(): Char\l+ is_digit(): Bool\l+ is_lower(): Bool\l+ is_upper(): Bool\l+ is_letter(): Bool\l+ is_whitespace(): Bool\l}" ] Discrete -> Char [dir=back arrowtail=open style=dashed]; Pointer [ - label = "{Pointer||+ address_is_null(): Bool\l+ free()\l+ autoinit()\l}" + label = "{Pointer||+ nul(): Pointer\l+ address_is_null(): Bool\l+ free()\l- native_equals(o: Pointer): Bool\l+ defaultinit()\l}" ] Object -> Pointer [dir=back arrowtail=open style=dashed]; Task [ - label = "{interface\nTask||+ main()\l+ autoinit()\l}" + label = "{interface\nTask||+ main()\l+ defaultinit()\l}" ] Object -> Task [dir=back arrowtail=open style=dashed]; A [ - label = "{A|- _vpubA: nullable A\l- _vproA: nullable A\l- _vpriA: nullable A\l- _vpubA2: A\l- _vproA2: A\l- _vpriA2: A\l- _vpriB: nullable B\l- _vpriB2: B\l|+ pubA(a: A)\l# proA(a: A)\l- priA(a: A)\l+ pubA2(): A\l# proA2(): A\l- priA2(): A\l+ vpubA(): nullable A\l+ vpubA=(vpubA: nullable A)\l# vproA(): nullable A\l# vproA=(vproA: nullable A)\l- vpriA(): nullable A\l- vpriA=(vpriA: nullable A)\l+ vpubA2(): A\l+ vpubA2=(vpubA2: A)\l# vproA2(): A\l# vproA2=(vproA2: A)\l- vpriA2(): A\l- vpriA2=(vpriA2: A)\l- priB(a: B)\l- priB2(): B\l- vpriB(): nullable B\l- vpriB=(vpriB: nullable B)\l- vpriB2(): B\l- vpriB2=(vpriB2: B)\l+ autoinit()\l}" + label = "{A|- _vpubA: nullable A\l- _vproA: nullable A\l- _vpriA: nullable A\l- _vpubA2: A\l- _vproA2: A\l- _vpriA2: A\l- _vpriB: nullable B\l- _vpriB2: B\l|+ pubA(a: A)\l# proA(a: A)\l- priA(a: A)\l+ pubA2(): A\l# proA2(): A\l- priA2(): A\l+ vpubA(): nullable A\l+ vpubA=(vpubA: nullable A)\l# vproA(): nullable A\l# vproA=(vproA: nullable A)\l- vpriA(): nullable A\l- vpriA=(vpriA: nullable A)\l+ vpubA2(): A\l+ vpubA2=(vpubA2: A)\l# vproA2(): A\l# vproA2=(vproA2: A)\l- vpriA2(): A\l- vpriA2=(vpriA2: A)\l- priB(a: B)\l- priB2(): B\l- vpriB(): nullable B\l- vpriB=(vpriB: nullable B)\l- vpriB2(): B\l- vpriB2=(vpriB2: B)\l+ defaultinit()\l}" ] Object -> A [dir=back arrowtail=open style=dashed]; B [ - label = "{B|- _vpubA: nullable A\l- _vpriA: nullable A\l- _vpubA2: A\l- _vpriA2: A\l- _vpubB: nullable B\l- _vpriB: nullable B\l- _vpubB2: B\l- _vpriB2: B\l|- pubA(a: A)\l- priA(a: A)\l- vpubA(): nullable A\l- vpubA=(vpubA: nullable A)\l- vpriA(): nullable A\l- vpriA=(vpriA: nullable A)\l- vpubA2(): A\l- vpubA2=(vpubA2: A)\l- vpriA2(): A\l- vpriA2=(vpriA2: A)\l- pubB(a: B)\l- priB(a: B)\l- vpubB(): nullable B\l- vpubB=(vpubB: nullable B)\l- vpriB(): nullable B\l- vpriB=(vpriB: nullable B)\l- vpubB2(): B\l- vpubB2=(vpubB2: B)\l- vpriB2(): B\l- vpriB2=(vpriB2: B)\l+ autoinit()\l}" + label = "{B|- _vpubA: nullable A\l- _vpriA: nullable A\l- _vpubA2: A\l- _vpriA2: A\l- _vpubB: nullable B\l- _vpriB: nullable B\l- _vpubB2: B\l- _vpriB2: B\l|- pubA(a: A)\l- priA(a: A)\l- vpubA(): nullable A\l- vpubA=(vpubA: nullable A)\l- vpriA(): nullable A\l- vpriA=(vpriA: nullable A)\l- vpubA2(): A\l- vpubA2=(vpubA2: A)\l- vpriA2(): A\l- vpriA2=(vpriA2: A)\l- pubB(a: B)\l- priB(a: B)\l- vpubB(): nullable B\l- vpubB=(vpubB: nullable B)\l- vpriB(): nullable B\l- vpriB=(vpriB: nullable B)\l- vpubB2(): B\l- vpubB2=(vpubB2: B)\l- vpriB2(): B\l- vpriB2=(vpriB2: B)\l+ defaultinit()\l}" ] Object -> B [dir=back arrowtail=open style=dashed]; C [ - label = "{C|- _vpriA: nullable A\l- _vpriA2: A\l|- priA(a: A)\l- vpriA(): nullable A\l- vpriA=(vpriA: nullable A)\l- vpriA2(): A\l- vpriA2=(vpriA2: A)\l+ autoinit()\l}" + label = "{C|- _vpriA: nullable A\l- _vpriA2: A\l|- priA(a: A)\l- vpriA(): nullable A\l- vpriA=(vpriA: nullable A)\l- vpriA2(): A\l- vpriA2=(vpriA2: A)\l+ defaultinit()\l}" ] Object -> C [dir=back arrowtail=open style=dashed]; D [ - label = "{D|- _vpubA: nullable A\l- _vpriA: nullable A\l- _vpubA2: A\l- _vpriA2: A\l|- pubA(a: A)\l- priA(a: A)\l- vpubA(): nullable A\l- vpubA=(vpubA: nullable A)\l- vpriA(): nullable A\l- vpriA=(vpriA: nullable A)\l- vpubA2(): A\l- vpubA2=(vpubA2: A)\l- vpriA2(): A\l- vpriA2=(vpriA2: A)\l+ autoinit()\l}" + label = "{D|- _vpubA: nullable A\l- _vpriA: nullable A\l- _vpubA2: A\l- _vpriA2: A\l|- pubA(a: A)\l- priA(a: A)\l- vpubA(): nullable A\l- vpubA=(vpubA: nullable A)\l- vpriA(): nullable A\l- vpriA=(vpriA: nullable A)\l- vpubA2(): A\l- vpubA2=(vpubA2: A)\l- vpriA2(): A\l- vpriA2=(vpriA2: A)\l+ defaultinit()\l}" ] Object -> D [dir=back arrowtail=open style=dashed]; diff --git a/tests/sav/nituml_args4.res b/tests/sav/nituml_args4.res index c79556c..3248f5a 100644 --- a/tests/sav/nituml_args4.res +++ b/tests/sav/nituml_args4.res @@ -12,78 +12,78 @@ digraph G { fontsize = 8 ] Object [ - label = "{interface\nObject||+ object_id(): Int\l+ is_same_type(other: Object): Bool\l+ is_same_instance(other: nullable Object): Bool\l+ ==(other: nullable Object): Bool\l+ !=(other: nullable Object): Bool\l+ output()\l+ output_class_name()\l+ hash(): Int\l+ sys(): Sys\l+ init()\l+ autoinit()\l}" + label = "{interface\nObject||+ object_id(): Int\l+ is_same_type(other: Object): Bool\l+ is_same_instance(other: nullable Object): Bool\l+ ==(other: nullable Object): Bool\l+ !=(other: nullable Object): Bool\l+ output()\l+ output_class_name()\l+ hash(): Int\l+ sys(): Sys\l+ init()\l+ defaultinit()\l}" ] Sys [ - label = "{Sys||+ main()\l+ run()\l+ errno(): Int\l+ exit(exit_value: Int)\l+ autoinit()\l}" + label = "{Sys||+ main()\l+ run()\l+ errno(): Int\l+ exit(exit_value: Int)\l+ is_windows(): Bool\l+ defaultinit()\l}" ] Object -> Sys [dir=back arrowtail=open style=dashed]; Comparable [ - label = "{interface\nComparable||+ \<(other: OTHER): Bool\l+ \<=(other: OTHER): Bool\l+ \>=(other: OTHER): Bool\l+ \>(other: OTHER): Bool\l+ \<=\>(other: OTHER): Int\l+ is_between(c: OTHER, d: OTHER): Bool\l+ max(other: OTHER): OTHER\l+ min(c: OTHER): OTHER\l+ autoinit()\l}" + label = "{interface\nComparable||+ \<(other: OTHER): Bool\l+ \<=(other: OTHER): Bool\l+ \>=(other: OTHER): Bool\l+ \>(other: OTHER): Bool\l+ \<=\>(other: OTHER): Int\l+ is_between(c: OTHER, d: OTHER): Bool\l+ max(other: OTHER): OTHER\l+ min(c: OTHER): OTHER\l+ defaultinit()\l}" ] Object -> Comparable [dir=back arrowtail=open style=dashed]; Discrete [ - label = "{interface\nDiscrete||+ successor(i: Int): OTHER\l+ predecessor(i: Int): OTHER\l+ distance(d: OTHER): Int\l+ autoinit()\l}" + label = "{interface\nDiscrete||+ successor(i: Int): OTHER\l+ predecessor(i: Int): OTHER\l+ distance(d: OTHER): Int\l+ defaultinit()\l}" ] Comparable -> Discrete [dir=back arrowtail=open style=dashed]; Cloneable [ - label = "{interface\nCloneable||+ clone(): SELF\l+ autoinit()\l}" + label = "{interface\nCloneable||+ clone(): SELF\l+ defaultinit()\l}" ] Object -> Cloneable [dir=back arrowtail=open style=dashed]; Numeric [ - label = "{interface\nNumeric||+ +(i: OTHER): OTHER\l+ -(i: OTHER): OTHER\l+ unary -(): OTHER\l+ *(i: OTHER): OTHER\l+ /(i: OTHER): OTHER\l+ to_i(): Int\l+ to_f(): Float\l+ to_b(): Byte\l+ is_zero(): Bool\l+ zero(): OTHER\l+ value_of(val: Numeric): OTHER\l+ autoinit()\l}" + label = "{interface\nNumeric||+ +(i: OTHER): OTHER\l+ -(i: OTHER): OTHER\l+ unary -(): OTHER\l+ *(i: OTHER): OTHER\l+ /(i: OTHER): OTHER\l+ to_i(): Int\l+ to_f(): Float\l+ to_b(): Byte\l+ is_zero(): Bool\l+ zero(): OTHER\l+ value_of(val: Numeric): OTHER\l+ defaultinit()\l}" ] Comparable -> Numeric [dir=back arrowtail=open style=dashed]; Bool [ - label = "{Bool||+ to_i(): Int\l+ autoinit()\l}" + label = "{Bool||+ to_i(): Int\l}" ] Object -> Bool [dir=back arrowtail=open style=dashed]; Float [ - label = "{Float||+ is_approx(other: Float, precision: Float): Bool\l+ autoinit()\l}" + label = "{Float||+ is_approx(other: Float, precision: Float): Bool\l}" ] Numeric -> Float [dir=back arrowtail=open style=dashed]; Byte [ - label = "{Byte||+ %(i: Byte): Byte\l+ \<\<(i: Int): Byte\l+ \>\>(i: Int): Byte\l+ ascii(): Char\l+ is_whitespace(): Bool\l+ autoinit()\l}" + label = "{Byte||+ %(i: Byte): Byte\l+ \<\<(i: Int): Byte\l+ \>\>(i: Int): Byte\l+ is_whitespace(): Bool\l}" ] Discrete -> Byte [dir=back arrowtail=open style=dashed]; Numeric -> Byte [dir=back arrowtail=open style=dashed]; Int [ - label = "{Int||+ %(i: Int): Int\l+ \<\<(i: Int): Int\l+ \>\>(i: Int): Int\l+ code_point(): Char\l+ digit_count(b: Int): Int\l+ digit_count_base_10(): Int\l+ to_c(): Char\l+ abs(): Int\l+ autoinit()\l}" + label = "{Int||+ %(i: Int): Int\l+ \<\<(i: Int): Int\l+ \>\>(i: Int): Int\l+ code_point(): Char\l+ digit_count(b: Int): Int\l+ digit_count_base_10(): Int\l+ to_c(): Char\l+ abs(): Int\l+ is_whitespace(): Bool\l}" ] Discrete -> Int [dir=back arrowtail=open style=dashed]; Numeric -> Int [dir=back arrowtail=open style=dashed]; Char [ - label = "{Char||+ to_i(): Int\l+ ascii(): Byte\l+ code_point(): Int\l+ is_ascii(): Bool\l+ to_lower(): Char\l+ to_upper(): Char\l+ is_digit(): Bool\l+ is_lower(): Bool\l+ is_upper(): Bool\l+ is_letter(): Bool\l+ is_whitespace(): Bool\l+ autoinit()\l}" + label = "{Char||+ +(i: Int): Char\l+ -(i: Int): Char\l+ to_i(): Int\l+ code_point(): Int\l+ is_ascii(): Bool\l+ to_lower(): Char\l+ to_upper(): Char\l+ is_digit(): Bool\l+ is_lower(): Bool\l+ is_upper(): Bool\l+ is_letter(): Bool\l+ is_whitespace(): Bool\l}" ] Discrete -> Char [dir=back arrowtail=open style=dashed]; Pointer [ - label = "{Pointer||+ address_is_null(): Bool\l+ free()\l+ autoinit()\l}" + label = "{Pointer||+ nul(): Pointer\l+ address_is_null(): Bool\l+ free()\l+ defaultinit()\l}" ] Object -> Pointer [dir=back arrowtail=open style=dashed]; Task [ - label = "{interface\nTask||+ main()\l+ autoinit()\l}" + label = "{interface\nTask||+ main()\l+ defaultinit()\l}" ] Object -> Task [dir=back arrowtail=open style=dashed]; A [ - label = "{A||+ pubA(a: A)\l# proA(a: A)\l+ pubA2(): A\l# proA2(): A\l+ vpubA(): nullable A\l+ vpubA=(vpubA: nullable A)\l# vproA(): nullable A\l# vproA=(vproA: nullable A)\l+ vpubA2(): A\l+ vpubA2=(vpubA2: A)\l# vproA2(): A\l# vproA2=(vproA2: A)\l+ autoinit()\l}" + label = "{A||+ pubA(a: A)\l# proA(a: A)\l+ pubA2(): A\l# proA2(): A\l+ vpubA(): nullable A\l+ vpubA=(vpubA: nullable A)\l# vproA(): nullable A\l# vproA=(vproA: nullable A)\l+ vpubA2(): A\l+ vpubA2=(vpubA2: A)\l# vproA2(): A\l# vproA2=(vproA2: A)\l+ defaultinit()\l}" ] Object -> A [dir=back arrowtail=open style=dashed]; C [ - label = "{C||+ autoinit()\l}" + label = "{C||+ defaultinit()\l}" ] Object -> C [dir=back arrowtail=open style=dashed]; diff --git a/tests/sav/nitx_args2.res b/tests/sav/nitx_args2.res index 48c2f5f..36bf720 100644 --- a/tests/sav/nitx_args2.res +++ b/tests/sav/nitx_args2.res @@ -5,5 +5,5 @@ Documentation for `base_simple3::Sys::foo`: + base_simple3::Sys::foo fun foo - base_simple3.nit:49,1--19 + base_simple3.nit:45,1--19 diff --git a/tests/sav/nitx_args3.res b/tests/sav/nitx_args3.res index e191640..8c12ac9 100644 --- a/tests/sav/nitx_args3.res +++ b/tests/sav/nitx_args3.res @@ -7,7 +7,7 @@ Features for `base_simple3::base_simple3`: + base_simple3$B class B - base_simple3.nit:34,1--42,3 + base_simple3.nit:34,1--38,3 + base_simple3$Bool enum Bool @@ -15,7 +15,7 @@ Features for `base_simple3::base_simple3`: + base_simple3$C class C - base_simple3.nit:44,1--47,3 + base_simple3.nit:40,1--43,3 + base_simple3$Int enum Int @@ -27,5 +27,5 @@ Features for `base_simple3::base_simple3`: + base_simple3$Sys class Sys - base_simple3.nit:49,1--19 + base_simple3.nit:45,1--19 diff --git a/tests/sav/test_highlight_args1.res b/tests/sav/test_highlight_args1.res index 0253287..43b741f 100644 --- a/tests/sav/test_highlight_args1.res +++ b/tests/sav/test_highlight_args1.res @@ -52,49 +52,45 @@

base_simple3$B$val

	var val: Int

base_simple3$B$val=

-
	var val: Int
-

base_simple3$B$autoinit

-
	init(v: Int)
-	do
-		7.output
-		self.val = v
-	end
+
	var val: Int
+

base_simple3$B$Object::init

+
	init do 7.output

base_simple3$B$run

-
	fun run do val.output
+
	fun run do val.output

base_simple3$C$_val1

-
	var val1: Int
+
	var val1: Int

base_simple3$C$val1

-
	var val1: Int
+
	var val1: Int

base_simple3$C$val1=

-
	var val1: Int
+
	var val1: Int

base_simple3$C$_val2

-
	var val2: Int = 10
+
	var val2: Int = 10

base_simple3$C$val2

-
	var val2: Int = 10
+
	var val2: Int = 10

base_simple3$C$val2=

-
	var val2: Int = 10
+
	var val2: Int = 10

base_simple3$Sys$foo

-
fun foo do 2.output
+
fun foo do 2.output

base_simple3$Sys$bar

-
fun bar(i: Int) do i.output
+
fun bar(i: Int) do i.output

base_simple3$Sys$baz

-
fun baz: Int do return 4
+
fun baz: Int do return 4

base_simple3$Sys$main

-
1.output
-foo
-bar(3)
-baz.output
-
-var a = new A
-a.run
-
-var b = new B(8)
-b.run
-
-var c = new C(9)
-c.val1.output
-c.val2.output
-

AST node: AModule at base_simple3.nit:17,1--66,13

+
1.output
+foo
+bar(3)
+baz.output
+
+var a = new A
+a.run
+
+var b = new B(8)
+b.run
+
+var c = new C(9)
+c.val1.output
+c.val2.output
+

AST node: AModule at base_simple3.nit:17,1--62,13

import end
 
 interface Object
@@ -113,38 +109,34 @@
 end
 
 class B
-	var val: Int
-	init(v: Int)
-	do
-		7.output
-		self.val = v
-	end
-	fun run do val.output
-end
-
-class C
-	var val1: Int
-	var val2: Int = 10
-end
+	var val: Int
+	init do 7.output
+	fun run do val.output
+end
+
+class C
+	var val1: Int
+	var val2: Int = 10
+end
+
+fun foo do 2.output
+fun bar(i: Int) do i.output
+fun baz: Int do return 4
 
-fun foo do 2.output
-fun bar(i: Int) do i.output
-fun baz: Int do return 4
-
-1.output
-foo
-bar(3)
-baz.output
-
-var a = new A
-a.run
-
-var b = new B(8)
-b.run
-
-var c = new C(9)
-c.val1.output
-c.val2.output
+1.output +foo +bar(3) +baz.output + +var a = new A +a.run + +var b = new B(8) +b.run + +var c = new C(9) +c.val1.output +c.val2.output

AST node: ANoImport at base_simple3.nit:17,1--10

import end

AST node: APublicVisibility at base_simple3.nit:17,1

@@ -191,8 +183,28 @@

AST node: TKwclass at base_simple3.nit:29,1--5

class

AST node: TKwinit at base_simple3.nit:30,2--5

-
	init
+
	init

AST node: TKwdo at base_simple3.nit:30,7--8

 do

AST node: ACallExpr at base_simple3.nit:30,10--17

-
 5 5.output
+

AST node: AIntegerExpr at base_simple3.nit:30,10

+
 5
+

AST node: TInteger at base_simple3.nit:30,10

+
 5
+

AST node: AQid at base_simple3.nit:30,12--17

+
output
+

AST node: AListExprs at base_simple3.nit:30,17

+
+

AST node: AAttrPropdef at base_simple3.nit:35,2--13

+
	var val: Int
+

AST node: TKwvar at base_simple3.nit:35,2--4

+
	var
+

AST node: AType at base_simple3.nit:35,11--13

+
 Int
+

AST node: AImplicitSelfExpr at base_simple3.nit:37,13

+
+

AST node: TAssign at base_simple3.nit:42,16

+
 =
+

AST node: ATopClassdef at base_simple3.nit:45,1--19

+
fun foo do 2.