diff --git a/ets2panda/checker/ets/aliveAnalyzer.cpp b/ets2panda/checker/ets/aliveAnalyzer.cpp index e4edb04a7a1eadcccc752a94d25838480119604d..04ab1a00587bede0ac73b683f53c2cac20879b05 100644 --- a/ets2panda/checker/ets/aliveAnalyzer.cpp +++ b/ets2panda/checker/ets/aliveAnalyzer.cpp @@ -81,10 +81,22 @@ void AliveAnalyzer::AnalyzeNode(const ir::AstNode *node) AnalyzeMethodDef(node->AsMethodDefinition()); break; } + case ir::AstNodeType::ARROW_FUNCTION_EXPRESSION: { + AnalyzeArrFuncExp(node->AsArrowFunctionExpression()); + break; + } case ir::AstNodeType::VARIABLE_DECLARATION: { AnalyzeVarDef(node->AsVariableDeclaration()); break; } + case ir::AstNodeType::ASSIGNMENT_EXPRESSION: { + AnalyzeAssignExp(node->AsAssignmentExpression()); + break; + } + case ir::AstNodeType::CLASS_PROPERTY: { + AnalyzeClassProp(node->AsClassProperty()); + break; + } case ir::AstNodeType::BLOCK_STATEMENT: { AnalyzeStats(node->AsBlockStatement()->Statements()); break; @@ -273,6 +285,48 @@ void AliveAnalyzer::AnalyzeMethodDef(const ir::MethodDefinition *methodDef) ClearPendingExits(); } +void AliveAnalyzer::AnalyzeArrFuncExp(const ir::ArrowFunctionExpression *arrFuncExp) +{ + auto *func = arrFuncExp->Function(); + + if (func->Body() == nullptr || func->IsProxy()) { + return; + } + + status_ = LivenessStatus::ALIVE; + AnalyzeStat(func->Body()); + ES2PANDA_ASSERT(arrFuncExp->TsType() && arrFuncExp->TsType()->IsETSFunctionType()); + const auto *returnType = arrFuncExp->TsType()->AsETSFunctionType()->ArrowSignature()->ReturnType(); + const auto isVoid = returnType->IsETSVoidType() || returnType == checker_->GlobalVoidType(); + const auto unionHasVoid = + returnType->IsETSUnionType() && + std::find_if(returnType->AsETSUnionType()->ConstituentTypes().begin(), + returnType->AsETSUnionType()->ConstituentTypes().end(), [this](const Type *type) { + return type->IsETSVoidType() || type == checker_->GlobalVoidType(); + }) != returnType->AsETSUnionType()->ConstituentTypes().end(); + + auto isPromiseVoid = false; + + if (returnType->IsETSObjectType() && + returnType->AsETSObjectType()->AssemblerName() == compiler::Signatures::BUILTIN_PROMISE) { + const auto *asAsync = returnType->AsETSObjectType(); + isPromiseVoid = asAsync->TypeArguments().front() == checker_->GlobalETSUndefinedType() || + asAsync->TypeArguments().front() == checker_->GlobalVoidType(); + } + + const bool isAsyncArrow = func->IsAsync(); + if (status_ == LivenessStatus::ALIVE && !isVoid && !isPromiseVoid && !isAsyncArrow && !unionHasVoid) { + if (!func->HasReturnStatement()) { + checker_->LogError(diagnostic::MISSING_RETURN_STMT, {}, arrFuncExp->Start()); + ClearPendingExits(); + return; + } + checker_->LogError(diagnostic::NONRETURNING_PATHS, {}, arrFuncExp->Start()); + } + + ClearPendingExits(); +} + void AliveAnalyzer::AnalyzeVarDef(const ir::VariableDeclaration *varDef) { for (auto *it : varDef->Declarators()) { @@ -284,6 +338,25 @@ void AliveAnalyzer::AnalyzeVarDef(const ir::VariableDeclaration *varDef) } } +void AliveAnalyzer::AnalyzeAssignExp(const ir::AssignmentExpression *assignExp) +{ + if (assignExp->Left() != nullptr) { + AnalyzeNode(assignExp->Left()); + } + if (assignExp->Right() != nullptr) { + AnalyzeNode(assignExp->Right()); + } +} + +void AliveAnalyzer::AnalyzeClassProp(const ir::ClassProperty *prop) +{ + if (!prop->NeedInitInStaticBlock()) { + if (prop->Value() != nullptr) { + AnalyzeNode(prop->Value()); + } + } +} + void AliveAnalyzer::AnalyzeDoLoop(const ir::DoWhileStatement *doWhile) { SetOldPendingExits(PendingExits()); diff --git a/ets2panda/checker/ets/aliveAnalyzer.h b/ets2panda/checker/ets/aliveAnalyzer.h index ade9092244b8a53dccd3e3c4844aa41f813fd6ea..1d4f742aceeec606df14c9fabd88967249235d21 100644 --- a/ets2panda/checker/ets/aliveAnalyzer.h +++ b/ets2panda/checker/ets/aliveAnalyzer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -65,7 +65,10 @@ private: void AnalyzeStructDecl(const ir::ETSStructDeclaration *structDecl); void AnalyzeClassDecl(const ir::ClassDeclaration *classDecl); void AnalyzeMethodDef(const ir::MethodDefinition *methodDef); + void AnalyzeArrFuncExp(const ir::ArrowFunctionExpression *arrFuncExp); void AnalyzeVarDef(const ir::VariableDeclaration *varDef); + void AnalyzeAssignExp(const ir::AssignmentExpression *assignExp); + void AnalyzeClassProp(const ir::ClassProperty *prop); void AnalyzeDoLoop(const ir::DoWhileStatement *doWhile); void AnalyzeWhileLoop(const ir::WhileStatement *whileStmt); void AnalyzeForLoop(const ir::ForUpdateStatement *forStmt); diff --git a/ets2panda/test/ast/compiler/ets/LambdaParameterWithImplicitType.ets b/ets2panda/test/ast/compiler/ets/LambdaParameterWithImplicitType.ets index 2cde0dd68986def9af9d335f874e106fcd582d0b..fe359d4167e70eda97d74989f9be28d40e053f15 100644 --- a/ets2panda/test/ast/compiler/ets/LambdaParameterWithImplicitType.ets +++ b/ets2panda/test/ast/compiler/ets/LambdaParameterWithImplicitType.ets @@ -24,3 +24,5 @@ foo().then((result) => { // crash - issue #2 let fooArray = ["a", "b", "c"]; let fooArrayMapped = fooArray.map(x => x + " is mapped"); // crash - issue #26856 let fooArrayMappedAndChecked = fooArray.map(x => x == "a"); // crash - issue #26856 + +/* @@? 26:5 Warning Warning: Unreachable statement. */ \ No newline at end of file diff --git a/ets2panda/test/ast/compiler/ets/arrow_function_missing_return_value.ets b/ets2panda/test/ast/compiler/ets/arrow_function_missing_return_value.ets new file mode 100644 index 0000000000000000000000000000000000000000..6a48753044fdb3da41a9d2577ac861fddd286a08 --- /dev/null +++ b/ets2panda/test/ast/compiler/ets/arrow_function_missing_return_value.ets @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const f = /* @@ label1 */():number => {} +let g = /* @@ label2 */():number => {} +function main(): void { + let h = /* @@ label3 */():number => {} + const i = /* @@ label4 */():number => {} +} + +/* @@@ label1 Error TypeError: Function with a non void return type must return a value. */ +/* @@@ label2 Error TypeError: Function with a non void return type must return a value. */ +/* @@@ label3 Error TypeError: Function with a non void return type must return a value. */ +/* @@@ label4 Error TypeError: Function with a non void return type must return a value. */ \ No newline at end of file diff --git a/ets2panda/test/ast/compiler/ets/trailing_lambda_statements.ets b/ets2panda/test/ast/compiler/ets/trailing_lambda_statements.ets index 9562b97a8e40f496a5b19b1faba2632aed8d5987..2f57c0d6325eaddfc34914d08bf60fcec5c0cd44 100644 --- a/ets2panda/test/ast/compiler/ets/trailing_lambda_statements.ets +++ b/ets2panda/test/ast/compiler/ets/trailing_lambda_statements.ets @@ -39,3 +39,7 @@ let a = foo() { } return 1 } + +/* @@? 33:9 Warning Warning: Unreachable statement. */ +/* @@? 36:5 Warning Warning: Unreachable statement. */ +/* @@? 40:5 Warning Warning: Unreachable statement. */ \ No newline at end of file diff --git a/ets2panda/test/ast/compiler/ets/unnecessary_boxing.ets b/ets2panda/test/ast/compiler/ets/unnecessary_boxing.ets index 30f408b2bf9f12a8b6af87f4f0524822c4f1177e..e490a4c9148f72601c97c7a4bd1fe7a9636ac8d5 100644 --- a/ets2panda/test/ast/compiler/ets/unnecessary_boxing.ets +++ b/ets2panda/test/ast/compiler/ets/unnecessary_boxing.ets @@ -18,3 +18,9 @@ let y:()=>int = ()=>16 as int y = true ? y:():int=>32 y = true ? ():int=>32:y + +/* @@? 16:2 Warning Warning: Unreachable statement. */ +/* @@? 17:2 Warning Warning: Unreachable statement. */ +/* @@? 18:6 Warning Warning: Unreachable statement. */ +/* @@? 19:2 Warning Warning: Unreachable statement. */ +/* @@? 20:2 Warning Warning: Unreachable statement. */ \ No newline at end of file diff --git a/ets2panda/test/runtime/ets/function_type_with_receiver/validReturnThisOfExtensionFunction.ets b/ets2panda/test/ast/compiler/ets/validReturnThisOfExtensionFunction.ets similarity index 90% rename from ets2panda/test/runtime/ets/function_type_with_receiver/validReturnThisOfExtensionFunction.ets rename to ets2panda/test/ast/compiler/ets/validReturnThisOfExtensionFunction.ets index f506d8ea788dde2dbe1eafbde6500cd6622df6f0..034cde4498516e84d3fc92c2ce6acbe45044f3ad 100644 --- a/ets2panda/test/runtime/ets/function_type_with_receiver/validReturnThisOfExtensionFunction.ets +++ b/ets2panda/test/ast/compiler/ets/validReturnThisOfExtensionFunction.ets @@ -21,3 +21,5 @@ let y: (this: A, n: number) => this; function foo(a: A, ff:(this: A, n: number) => this) {}; function foo2(ff:(this: A, n: number) => this, a:A) {}; function foo3(this: A, n: number):this {return this}; + +/* @@? 20:1 Error TypeError: Function with a non void return type must return a value. */ diff --git a/ets2panda/test/ast/parser/ets/type_decution_unnecessary_boxing.ets b/ets2panda/test/ast/parser/ets/type_decution_unnecessary_boxing.ets index f527a7805615f8a32af543cafcc4d6090566a623..109aa9535af827920718803d30b80976f66bb187 100644 --- a/ets2panda/test/ast/parser/ets/type_decution_unnecessary_boxing.ets +++ b/ets2panda/test/ast/parser/ets/type_decution_unnecessary_boxing.ets @@ -19,4 +19,11 @@ x = true ? x:():long=>32 let y:()=>int = ()=>16 as int y = true ? y:():int=>32 y = true ? ():int=>32:y -x = true ? x:"apple" \ No newline at end of file +x = true ? x:"apple" + +/* @@? 17:1 Warning Warning: Unreachable statement. */ +/* @@? 18:1 Warning Warning: Unreachable statement. */ +/* @@? 19:5 Warning Warning: Unreachable statement. */ +/* @@? 20:1 Warning Warning: Unreachable statement. */ +/* @@? 21:1 Warning Warning: Unreachable statement. */ +/* @@? 22:1 Warning Warning: Unreachable statement. */ \ No newline at end of file diff --git a/ets2panda/test/compiler/ets/generics_implicit_lambda1-expected.txt b/ets2panda/test/compiler/ets/generics_implicit_lambda1-expected.txt index ded34117695bcd8e51ff1a5b2110816c6283ad4b..00910c3a9ceed736fefad269254ca4c2b96d1105 100644 --- a/ets2panda/test/compiler/ets/generics_implicit_lambda1-expected.txt +++ b/ets2panda/test/compiler/ets/generics_implicit_lambda1-expected.txt @@ -2506,3 +2506,5 @@ } } } +Warning: Unreachable statement. [generics_implicit_lambda1.ets:38:5] +Warning: Unreachable statement. [generics_implicit_lambda1.ets:40:5] diff --git a/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_arrow_expression-expected.txt b/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_arrow_expression-expected.txt index 94ab0e2a26aca4d4178255bb30d17be96d2c82b0..44f67e9ab1a751d35fffb87eababf881aa00559a 100644 --- a/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_arrow_expression-expected.txt +++ b/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_arrow_expression-expected.txt @@ -849,3 +849,4 @@ } } } +Warning: Unreachable statement. [lambda_infer_type_arrow_expression.ets:19:9] diff --git a/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_arrow_expression_literal-expected.txt b/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_arrow_expression_literal-expected.txt index 84d41df13bbb4fdbbeb9d54c4501090a40ced3ec..de15ee154ad45a3a0ce41c47509b945ad0ba86b5 100644 --- a/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_arrow_expression_literal-expected.txt +++ b/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_arrow_expression_literal-expected.txt @@ -802,3 +802,4 @@ } } } +Warning: Unreachable statement. [lambda_infer_type_arrow_expression_literal.ets:19:9] diff --git a/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_has_return-expected.txt b/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_has_return-expected.txt index 84661a995155d4c52d49b6c30fc49351af319275..8acfba759f826012badb80aa4d67bec94dbb3550 100644 --- a/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_has_return-expected.txt +++ b/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_has_return-expected.txt @@ -963,3 +963,4 @@ } } } +Warning: Unreachable statement. [lambda_infer_type_has_return.ets:22:9] diff --git a/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_return_array-expected.txt b/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_return_array-expected.txt index 46493e52c964a30ce512f5dedf1477a6274755d7..169b5a5193d13266a8d404fba00074cadbf76d1f 100644 --- a/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_return_array-expected.txt +++ b/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_return_array-expected.txt @@ -832,3 +832,4 @@ } } } +Warning: Unreachable statement. [lambda_infer_type_return_array.ets:19:3] diff --git a/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_return_lambda-expected.txt b/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_return_lambda-expected.txt index 1b6f4822a16ab8c4fabd0743d8d2db62744cd8ca..cb64d4b05fe457b463d2e323f53cb4466cbb1abc 100644 --- a/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_return_lambda-expected.txt +++ b/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_return_lambda-expected.txt @@ -723,3 +723,6 @@ } } } +Warning: Unreachable statement. [lambda_infer_type_return_lambda.ets:21:9] +Warning: Unreachable statement. [lambda_infer_type_return_lambda.ets:23:5] +Warning: Unreachable statement. [lambda_infer_type_return_lambda.ets:24:5] diff --git a/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_return_lambda1-expected.txt b/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_return_lambda1-expected.txt index 74a58d79df7addbbfdbf31dce0fe1d1a57a19a7f..1d103dbc8db36772d9ffc31d3e067224ab45cc9b 100644 --- a/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_return_lambda1-expected.txt +++ b/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_return_lambda1-expected.txt @@ -560,3 +560,4 @@ } } } +Warning: Unreachable statement. [lambda_infer_type_return_lambda1.ets:18:5] diff --git a/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_return_literal-expected.txt b/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_return_literal-expected.txt index e52b2b93df82be19d0394a0c906fd04876dcc585..a2456b761d34477c6a4eb5857cb8fdc9f4a7c46c 100644 --- a/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_return_literal-expected.txt +++ b/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_return_literal-expected.txt @@ -541,3 +541,4 @@ } } } +Warning: Unreachable statement. [lambda_infer_type_return_literal.ets:20:5] diff --git a/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_return_union-expected.txt b/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_return_union-expected.txt index 15901d7ccce2625c9c7677fab434e34fd5c5aba9..382908a7dc45af92fa985ceb763cf54b06df5536 100644 --- a/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_return_union-expected.txt +++ b/ets2panda/test/compiler/ets/lambda_infer_type/lambda_infer_type_return_union-expected.txt @@ -783,3 +783,4 @@ } } } +Warning: Unreachable statement. [lambda_infer_type_return_union.ets:21:3] diff --git a/ets2panda/test/compiler/ets/loopWithinLambda-expected.txt b/ets2panda/test/compiler/ets/loopWithinLambda-expected.txt index a281d834d864004f01d98fc2c7be01f8ad7fed7e..e0acbc1c5feaf977f738a200793734d07f706d21 100644 --- a/ets2panda/test/compiler/ets/loopWithinLambda-expected.txt +++ b/ets2panda/test/compiler/ets/loopWithinLambda-expected.txt @@ -1806,3 +1806,5 @@ } } } +Warning: Unreachable statement. [loopWithinLambda.ets:22:5] +Warning: Unreachable statement. [loopWithinLambda.ets:24:5] diff --git a/ets2panda/test/parser/ets/FunctionInSwitch-expected.txt b/ets2panda/test/parser/ets/FunctionInSwitch-expected.txt index 5d047a89035dd8685b5e96c3b4baa1ddb1d4dd24..dd1a273b101a935ab218d45abeb0ccd5b559b44b 100644 --- a/ets2panda/test/parser/ets/FunctionInSwitch-expected.txt +++ b/ets2panda/test/parser/ets/FunctionInSwitch-expected.txt @@ -878,3 +878,4 @@ } } } +Warning: Unreachable statement. [FunctionInSwitch.ets:29:17] diff --git a/ets2panda/test/parser/ets/async_with_lambda-expected.txt b/ets2panda/test/parser/ets/async_with_lambda-expected.txt index 9e47c47d77fd0bc236d66dc08df2976189603faf..1ba2ea539bd417dec48d63ab5a6e0467cb2a82c3 100644 --- a/ets2panda/test/parser/ets/async_with_lambda-expected.txt +++ b/ets2panda/test/parser/ets/async_with_lambda-expected.txt @@ -2441,3 +2441,5 @@ } } } +Warning: Unreachable statement. [async_with_lambda.ets:33:5] +Warning: Unreachable statement. [async_with_lambda.ets:38:5] diff --git a/ets2panda/test/parser/ets/await_keyword-expected.txt b/ets2panda/test/parser/ets/await_keyword-expected.txt index 250f778f4540efb374f7d1a4bd5ed9323645d903..a6dc9436d7ec423f9f5fcbababc8fb5eaf0af0cb 100644 --- a/ets2panda/test/parser/ets/await_keyword-expected.txt +++ b/ets2panda/test/parser/ets/await_keyword-expected.txt @@ -4539,3 +4539,11 @@ } } } +Warning: Unreachable statement. [await_keyword.ets:18:5] +Warning: Unreachable statement. [await_keyword.ets:19:5] +Warning: Unreachable statement. [await_keyword.ets:24:5] +Warning: Unreachable statement. [await_keyword.ets:25:5] +Warning: Unreachable statement. [await_keyword.ets:30:5] +Warning: Unreachable statement. [await_keyword.ets:33:5] +Warning: Unreachable statement. [await_keyword.ets:38:5] +Warning: Unreachable statement. [await_keyword.ets:39:5] diff --git a/ets2panda/test/parser/ets/lambda-type-inference-expected.txt b/ets2panda/test/parser/ets/lambda-type-inference-expected.txt index d25ca49fb4bb3c7dfe9fb41f9ae1eeecffe82eb1..7da2bbc6623da16780eb5df1ecc1fe0cda45e74d 100644 --- a/ets2panda/test/parser/ets/lambda-type-inference-expected.txt +++ b/ets2panda/test/parser/ets/lambda-type-inference-expected.txt @@ -2865,3 +2865,6 @@ } } } +Warning: Unreachable statement. [lambda-type-inference.ets:39:5] +Warning: Unreachable statement. [lambda-type-inference.ets:43:5] +Warning: Unreachable statement. [lambda-type-inference.ets:46:5] diff --git a/ets2panda/test/parser/ets/lambdaExpressionWithoutBlockStatement-expected.txt b/ets2panda/test/parser/ets/lambdaExpressionWithoutBlockStatement-expected.txt index 530d73f802be7fa5bf5ff17828a9c43a861b399d..eee6cd109ab27b7b7bd58553b754bf6fa8bda121 100644 --- a/ets2panda/test/parser/ets/lambdaExpressionWithoutBlockStatement-expected.txt +++ b/ets2panda/test/parser/ets/lambdaExpressionWithoutBlockStatement-expected.txt @@ -672,3 +672,4 @@ } } } +Warning: Unreachable statement. [lambdaExpressionWithoutBlockStatement.ets:19:5] diff --git a/ets2panda/test/parser/ets/lambdaExpressionWithoutBlockStatementWithFunctionParameters-expected.txt b/ets2panda/test/parser/ets/lambdaExpressionWithoutBlockStatementWithFunctionParameters-expected.txt index 3030f083775686d770099ce1b009394209694c12..632b99dce7201fc6489104025534e86dae2cfbcd 100644 --- a/ets2panda/test/parser/ets/lambdaExpressionWithoutBlockStatementWithFunctionParameters-expected.txt +++ b/ets2panda/test/parser/ets/lambdaExpressionWithoutBlockStatementWithFunctionParameters-expected.txt @@ -828,3 +828,4 @@ } } } +Warning: Unreachable statement. [lambdaExpressionWithoutBlockStatementWithFunctionParameters.ets:18:5] diff --git a/ets2panda/test/parser/ets/launch-expected.txt b/ets2panda/test/parser/ets/launch-expected.txt index 98f6cb3e8d7ccb09f01aaa78414b968c635190a2..c16459a41b4e22cbc12c4fb06ce33fb31ca04fb2 100755 --- a/ets2panda/test/parser/ets/launch-expected.txt +++ b/ets2panda/test/parser/ets/launch-expected.txt @@ -4004,3 +4004,4 @@ } } } +Warning: Unreachable statement. [launch.ets:47:3]