From ce4d234350183b2bd6579408c9bb2f93a3bee0d4 Mon Sep 17 00:00:00 2001 From: Miklos Magyari <miklos.magyari@sigmatechnology.se> Date: Thu, 7 Apr 2022 09:57:45 +0200 Subject: [PATCH] Fixed check of function return value Signed-off-by: Miklos Magyari <miklos.magyari@sigmatechnology.se> --- compiler2/ttcn3/Ttcnstuff.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler2/ttcn3/Ttcnstuff.cc b/compiler2/ttcn3/Ttcnstuff.cc index d48bdaef0..8b425bb22 100644 --- a/compiler2/ttcn3/Ttcnstuff.cc +++ b/compiler2/ttcn3/Ttcnstuff.cc @@ -3531,7 +3531,7 @@ namespace Ttcn { def1->error("Cannot override final method `%s'", def2->get_fullname().c_str()); } - else if (subclass_loc == NULL && func1->is_identical(func2)) { + else if (subclass_loc == NULL && func1->is_identical(func2) != Def_Function_Base::RES_DIFFERS) { if (func2->get_visibility() == PUBLIC && func1->get_visibility() != PUBLIC) { def1->error("Public methods can be only overridden by public methods `%s'", id1.get_dispname().c_str()); -- GitLab