Commit 0f7e2a75 authored by Botond Baranyi's avatar Botond Baranyi
Browse files

Fixed 'setverdict' operation in the destructor (bug 552011)



Change-Id: I915cec78a7656f5e88ac5fe5e3493582f06d6ed2
Signed-off-by: Botond Baranyi's avatarBotond Baranyi <botond.baranyi@ericsson.com>
parent 727c67b4
......@@ -3051,6 +3051,14 @@ namespace Ttcn {
abstract_functions.clear();
}
void ClassTypeBody::set_my_def(Def_Type* p_def)
{
my_def = p_def;
if (finally_block != NULL) {
finally_block->set_my_def(p_def);
}
}
void ClassTypeBody::set_fullname(const string& p_fullname)
{
if (built_in) {
......
......@@ -788,7 +788,7 @@ public:
ClassTypeBody* clone() const;
virtual ~ClassTypeBody();
void set_my_def(Def_Type* p_def) { my_def = p_def; }
void set_my_def(Def_Type* p_def);
Def_Type* get_my_def() { return my_def; }
boolean is_abstract() const { return abstract; }
......
......@@ -494,6 +494,15 @@ testcase tc_abstract() runs on CT {
}
}
type class Destructor { }
finally {
setverdict(pass);
}
testcase tc_destructor() runs on CT {
var Destructor x := Destructor.create;
}
control {
execute(tc_members_and_methods());
......@@ -506,6 +515,7 @@ control {
execute(tc_object());
execute(tc_order());
execute(tc_abstract());
execute(tc_destructor());
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment