From 7c3b7c2a54a7ac71090f80c0bd83cc7e6496a56f Mon Sep 17 00:00:00 2001 From: Botond Baranyi <botond.baranyi@ericsson.com> Date: Mon, 4 Oct 2021 17:32:23 +0200 Subject: [PATCH] OOP: fixed typo in error message and updated tests (issue #571) Signed-off-by: Botond Baranyi <botond.baranyi@ericsson.com> --- compiler2/ttcn3/Ttcnstuff.cc | 2 +- conformance_test/OOP_tests/negative_tests/50101_classes.script | 2 +- function_test/Semantic_Analyser/oop/oop_SE.ttcn | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler2/ttcn3/Ttcnstuff.cc b/compiler2/ttcn3/Ttcnstuff.cc index acf2ed002..290307950 100644 --- a/compiler2/ttcn3/Ttcnstuff.cc +++ b/compiler2/ttcn3/Ttcnstuff.cc @@ -3562,7 +3562,7 @@ namespace Ttcn { } checked = true; if ((final && abstract) || (final && trait) || (abstract && trait)) { - error("A classes cannot have more than one of the @final, @abstract and @trait modifiers"); + error("A class cannot have more than one of the @final, @abstract and @trait modifiers"); } if (external && abstract) { // todo error("External classes cannot be abstract"); diff --git a/conformance_test/OOP_tests/negative_tests/50101_classes.script b/conformance_test/OOP_tests/negative_tests/50101_classes.script index fe51b1147..2a8fc40c7 100644 --- a/conformance_test/OOP_tests/negative_tests/50101_classes.script +++ b/conformance_test/OOP_tests/negative_tests/50101_classes.script @@ -360,7 +360,7 @@ module NegSem_5010104_finalClasses_001 "TTCN-3:2018 Object-Oriented" { <END_MODULE> <RESULT COUNT> -error: Final classes cannot be abstract +error: A class cannot have more than one of the \@final, \@abstract and \@trait modifiers <END_RESULT> <END_TC> diff --git a/function_test/Semantic_Analyser/oop/oop_SE.ttcn b/function_test/Semantic_Analyser/oop/oop_SE.ttcn index 00ea89bff..c133753a5 100644 --- a/function_test/Semantic_Analyser/oop/oop_SE.ttcn +++ b/function_test/Semantic_Analyser/oop/oop_SE.ttcn @@ -346,7 +346,7 @@ function f_create() { //^In function definition// } -type class @final @abstract C21 { } //^In type definition// //A classes cannot have more than one of the \@final, \@abstract and \@trait modifiers// +type class @final @abstract C21 { } //^In type definition// //A class cannot have more than one of the \@final, \@abstract and \@trait modifiers// type class @final C22 { } -- GitLab