From e35e48fd8472242b1f65c521c32cf050b294f788 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Wed, 26 Jun 2024 21:01:15 -0400 Subject: [PATCH] tests: update unreachable statement related tests Signed-off-by: Jean Privat --- tests/sav/base_control_flow2_alt1.res | 2 +- tests/sav/base_control_flow2_alt2.res | 2 +- tests/sav/base_control_flow2_alt3.res | 2 +- tests/sav/base_control_flow2_alt4.res | 2 +- tests/sav/base_control_flow2_alt5.res | 2 +- tests/sav/base_control_flow2_alt6.res | 2 +- tests/sav/base_control_flow2_alt7.res | 2 +- tests/sav/base_control_flow_alt2.res | 2 +- tests/sav/base_control_flow_alt3.res | 2 +- tests/sav/nit_args9.res | 8 ++++---- tests/sav/nitc_args12.res | 8 ++++---- tests/sav/syntax_lambda.res | 18 +++++++++++++++++- 12 files changed, 34 insertions(+), 18 deletions(-) diff --git a/tests/sav/base_control_flow2_alt1.res b/tests/sav/base_control_flow2_alt1.res index e569abe25d..9fc00f6239 100644 --- a/tests/sav/base_control_flow2_alt1.res +++ b/tests/sav/base_control_flow2_alt1.res @@ -1,4 +1,4 @@ -alt/base_control_flow2_alt1.nit:24,2: Error: unreachable statement. +alt/base_control_flow2_alt1.nit:24,2: Warning: unreachable statement. alt/base_control_flow2_alt1.nit:21,1--25,3: Warning: use `loop` instead of `while true do`. alt/base_control_flow2_alt1.nit:39,1--43,3: Warning: use `loop` instead of `while true do`. alt/base_control_flow2_alt1.nit:47,2--51,4: Warning: use `loop` instead of `while true do`. diff --git a/tests/sav/base_control_flow2_alt2.res b/tests/sav/base_control_flow2_alt2.res index 72d2608527..69e0191723 100644 --- a/tests/sav/base_control_flow2_alt2.res +++ b/tests/sav/base_control_flow2_alt2.res @@ -1,5 +1,5 @@ alt/base_control_flow2_alt2.nit:21,1--25,3: Warning: use `loop` instead of `while true do`. -alt/base_control_flow2_alt2.nit:30,2: Error: unreachable statement. +alt/base_control_flow2_alt2.nit:30,2: Warning: unreachable statement. alt/base_control_flow2_alt2.nit:39,1--43,3: Warning: use `loop` instead of `while true do`. alt/base_control_flow2_alt2.nit:47,2--51,4: Warning: use `loop` instead of `while true do`. alt/base_control_flow2_alt2.nit:45,1--55,3: Warning: use `loop` instead of `while true do`. diff --git a/tests/sav/base_control_flow2_alt3.res b/tests/sav/base_control_flow2_alt3.res index 4c19474522..455b848f2a 100644 --- a/tests/sav/base_control_flow2_alt3.res +++ b/tests/sav/base_control_flow2_alt3.res @@ -1,5 +1,5 @@ alt/base_control_flow2_alt3.nit:21,1--25,3: Warning: use `loop` instead of `while true do`. -alt/base_control_flow2_alt3.nit:42,2: Error: unreachable statement. +alt/base_control_flow2_alt3.nit:42,2: Warning: unreachable statement. alt/base_control_flow2_alt3.nit:39,1--43,3: Warning: use `loop` instead of `while true do`. alt/base_control_flow2_alt3.nit:47,2--51,4: Warning: use `loop` instead of `while true do`. alt/base_control_flow2_alt3.nit:45,1--55,3: Warning: use `loop` instead of `while true do`. diff --git a/tests/sav/base_control_flow2_alt4.res b/tests/sav/base_control_flow2_alt4.res index a5ac542c28..8fff0ef356 100644 --- a/tests/sav/base_control_flow2_alt4.res +++ b/tests/sav/base_control_flow2_alt4.res @@ -1,5 +1,5 @@ alt/base_control_flow2_alt4.nit:21,1--25,3: Warning: use `loop` instead of `while true do`. alt/base_control_flow2_alt4.nit:39,1--43,3: Warning: use `loop` instead of `while true do`. -alt/base_control_flow2_alt4.nit:50,3: Error: unreachable statement. +alt/base_control_flow2_alt4.nit:50,3: Warning: unreachable statement. alt/base_control_flow2_alt4.nit:47,2--51,4: Warning: use `loop` instead of `while true do`. alt/base_control_flow2_alt4.nit:45,1--55,3: Warning: use `loop` instead of `while true do`. diff --git a/tests/sav/base_control_flow2_alt5.res b/tests/sav/base_control_flow2_alt5.res index 593356c3db..3109d5840a 100644 --- a/tests/sav/base_control_flow2_alt5.res +++ b/tests/sav/base_control_flow2_alt5.res @@ -1,5 +1,5 @@ alt/base_control_flow2_alt5.nit:21,1--25,3: Warning: use `loop` instead of `while true do`. alt/base_control_flow2_alt5.nit:39,1--43,3: Warning: use `loop` instead of `while true do`. alt/base_control_flow2_alt5.nit:47,2--51,4: Warning: use `loop` instead of `while true do`. -alt/base_control_flow2_alt5.nit:54,2: Error: unreachable statement. +alt/base_control_flow2_alt5.nit:54,2: Warning: unreachable statement. alt/base_control_flow2_alt5.nit:45,1--55,3: Warning: use `loop` instead of `while true do`. diff --git a/tests/sav/base_control_flow2_alt6.res b/tests/sav/base_control_flow2_alt6.res index e035bfc639..15e6bc1578 100644 --- a/tests/sav/base_control_flow2_alt6.res +++ b/tests/sav/base_control_flow2_alt6.res @@ -2,4 +2,4 @@ alt/base_control_flow2_alt6.nit:21,1--25,3: Warning: use `loop` instead of `whil alt/base_control_flow2_alt6.nit:39,1--43,3: Warning: use `loop` instead of `while true do`. alt/base_control_flow2_alt6.nit:47,2--51,4: Warning: use `loop` instead of `while true do`. alt/base_control_flow2_alt6.nit:45,1--55,3: Warning: use `loop` instead of `while true do`. -alt/base_control_flow2_alt6.nit:60,2: Error: unreachable statement. +alt/base_control_flow2_alt6.nit:60,2: Warning: unreachable statement. diff --git a/tests/sav/base_control_flow2_alt7.res b/tests/sav/base_control_flow2_alt7.res index a27882caec..8dea3d654d 100644 --- a/tests/sav/base_control_flow2_alt7.res +++ b/tests/sav/base_control_flow2_alt7.res @@ -2,4 +2,4 @@ alt/base_control_flow2_alt7.nit:21,1--25,3: Warning: use `loop` instead of `whil alt/base_control_flow2_alt7.nit:39,1--43,3: Warning: use `loop` instead of `while true do`. alt/base_control_flow2_alt7.nit:47,2--51,4: Warning: use `loop` instead of `while true do`. alt/base_control_flow2_alt7.nit:45,1--55,3: Warning: use `loop` instead of `while true do`. -alt/base_control_flow2_alt7.nit:67,2: Error: unreachable statement. +alt/base_control_flow2_alt7.nit:67,2: Warning: unreachable statement. diff --git a/tests/sav/base_control_flow_alt2.res b/tests/sav/base_control_flow_alt2.res index 9e5891b167..6284a482a0 100644 --- a/tests/sav/base_control_flow_alt2.res +++ b/tests/sav/base_control_flow_alt2.res @@ -1 +1 @@ -alt/base_control_flow_alt2.nit:23,2: Error: unreachable statement. +alt/base_control_flow_alt2.nit:23,2: Warning: unreachable statement. diff --git a/tests/sav/base_control_flow_alt3.res b/tests/sav/base_control_flow_alt3.res index 8c005cddf8..7b4d3ada16 100644 --- a/tests/sav/base_control_flow_alt3.res +++ b/tests/sav/base_control_flow_alt3.res @@ -1 +1 @@ -alt/base_control_flow_alt3.nit:54,2: Error: unreachable statement. +alt/base_control_flow_alt3.nit:54,2: Warning: unreachable statement. diff --git a/tests/sav/nit_args9.res b/tests/sav/nit_args9.res index 4181eb7811..694ecb8719 100644 --- a/tests/sav/nit_args9.res +++ b/tests/sav/nit_args9.res @@ -1,9 +1,6 @@ test_keep_going.nit:15,11--14: Error: class `Fail` not found in module `test_keep_going`. fun plop: Fail ^ -test_keep_going.nit:40,2--11: Error: unreachable statement. - 999.output - ^ test_keep_going.nit:26,2--5: Error: method or variable `fail` unknown in `Sys`. fail ^ @@ -13,10 +10,13 @@ test_keep_going.nit:35,5: Type Error: expected `Bool`, got `Int`. if 1 then abort ^ +test_keep_going.nit:40,2--11: Warning: unreachable statement. (unreachable) + 999.output + ^ test_keep_going.nit:44,18--21: Error: method `fail` does not exists in `Sys`. var a = new Sys.fail ^ -Errors: 6. Warnings: 0. +Errors: 5. Warnings: 1. 1 2 3 diff --git a/tests/sav/nitc_args12.res b/tests/sav/nitc_args12.res index 4181eb7811..694ecb8719 100644 --- a/tests/sav/nitc_args12.res +++ b/tests/sav/nitc_args12.res @@ -1,9 +1,6 @@ test_keep_going.nit:15,11--14: Error: class `Fail` not found in module `test_keep_going`. fun plop: Fail ^ -test_keep_going.nit:40,2--11: Error: unreachable statement. - 999.output - ^ test_keep_going.nit:26,2--5: Error: method or variable `fail` unknown in `Sys`. fail ^ @@ -13,10 +10,13 @@ test_keep_going.nit:35,5: Type Error: expected `Bool`, got `Int`. if 1 then abort ^ +test_keep_going.nit:40,2--11: Warning: unreachable statement. (unreachable) + 999.output + ^ test_keep_going.nit:44,18--21: Error: method `fail` does not exists in `Sys`. var a = new Sys.fail ^ -Errors: 6. Warnings: 0. +Errors: 5. Warnings: 1. 1 2 3 diff --git a/tests/sav/syntax_lambda.res b/tests/sav/syntax_lambda.res index 399d84085f..cff8831fcc 100644 --- a/tests/sav/syntax_lambda.res +++ b/tests/sav/syntax_lambda.res @@ -1 +1,17 @@ -syntax_lambda.nit:36,1--28: Error: unreachable statement. +syntax_lambda.nit:24,9--18: no implemented accept_typing for ALambdaExpr +syntax_lambda.nit:26,9--22: no implemented accept_typing for ALambdaExpr +syntax_lambda.nit:28,11--24: no implemented accept_typing for ALambdaExpr +syntax_lambda.nit:31,9--33,7: no implemented accept_typing for ALambdaExpr +syntax_lambda.nit:36,9--28: no implemented accept_typing for ALambdaExpr +syntax_lambda.nit:36,1--28: Warning: unreachable statement. +syntax_lambda.nit:37,10--26: no implemented accept_typing for ALambdaExpr +syntax_lambda.nit:39,9--30: no implemented accept_typing for ALambdaExpr +syntax_lambda.nit:41,9--48: no implemented accept_typing for ALambdaExpr +syntax_lambda.nit:43,10--29: no implemented accept_typing for ALambdaExpr +syntax_lambda.nit:45,5--18: no implemented accept_typing for ALambdaExpr +syntax_lambda.nit:46,5--18: no implemented accept_typing for ALambdaExpr +syntax_lambda.nit:49,1--51,8: no implemented accept_typing for ALambdaExpr +syntax_lambda.nit:55,2--15: no implemented accept_typing for ALambdaExpr +syntax_lambda.nit:56,1--14: no implemented accept_typing for ALambdaExpr +syntax_lambda.nit:58,9--60,10: no implemented accept_typing for ALambdaExpr +syntax_lambda.nit:64,1--32: no implemented accept_typing for ALambdaExpr