diff --git a/compiler2/ttcn3/AST_ttcn3.cc b/compiler2/ttcn3/AST_ttcn3.cc index 439e0935ff01e49b64b50d8c773e7ec5da2c924d..2bc045e2b9e7907268fbeee62a07c9fb039a6cf9 100644 --- a/compiler2/ttcn3/AST_ttcn3.cc +++ b/compiler2/ttcn3/AST_ttcn3.cc @@ -4373,12 +4373,7 @@ namespace Ttcn { if (info_base.needs_conversion()) body->set_needs_conversion(); } - // Check for restriction. - if (Template::is_less_restrictive(base_template->get_template_restriction(), - template_restriction)) { - error("The template restriction is not the same or more " - "restrictive as of base template `%s'", ass->get_fullname().c_str()); - } + // Checking formal parameter lists. FormalParList *base_fpl = base_template->get_FormalParList(); size_t nof_base_fps = base_fpl ? base_fpl->get_nof_fps() : 0; diff --git a/function_test/Semantic_Analyser/template/TempRes_OK.ttcn b/function_test/Semantic_Analyser/template/TempRes_OK.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..75ec620bd219e54518100a979c7a4a4e02ecbb5c --- /dev/null +++ b/function_test/Semantic_Analyser/template/TempRes_OK.ttcn @@ -0,0 +1,64 @@ +/****************************************************************************** + * Copyright (c) 2000-2016 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Szabo, Bence Janos + * + ******************************************************************************/ +module TempRes_OK { + + template integer MyIntTemplate := 5; + + template integer MyIntTemplate2 modifies MyIntTemplate := 5; + + template (value) integer MyIntTemplate3 modifies MyIntTemplate := 5; + + template (omit) integer MyIntTemplate4 modifies MyIntTemplate := 5; + + template (present) integer MyIntTemplate5 modifies MyIntTemplate := 5; + + + + + template (value) integer MyValueIntTemplate := 5; + + template (value) integer MyValueIntTemplate2 modifies MyValueIntTemplate := 5; + + template integer MyValueIntTemplate3 modifies MyValueIntTemplate := 5; + + template (omit) integer MyValueIntTemplate4 modifies MyValueIntTemplate := 5; + + template (present) integer MyValueIntTemplate5 modifies MyValueIntTemplate := 5; + + + + + template (omit) integer MyOmitIntTemplate := 5; + + template (omit) integer MyOmitIntTemplate2 modifies MyOmitIntTemplate := 5; + + template (value) integer MyOmitIntTemplate3 modifies MyOmitIntTemplate := 5; + + template integer MyOmitIntTemplate4 modifies MyOmitIntTemplate := 5; + + template (present) integer MyOmitIntTemplate5 modifies MyOmitIntTemplate := 5; + + + + + template (present) integer MyPresentIntTemplate := 5; + + template (present) integer MyPresentIntTemplate2 modifies MyPresentIntTemplate := 5; + + template (omit) integer MyPresentIntTemplate3 modifies MyPresentIntTemplate := 5; + + template (value) integer MyPresentIntTemplate4 modifies MyPresentIntTemplate := 5; + + template integer MyPresentIntTemplate5 modifies MyPresentIntTemplate := 5; + + +} \ No newline at end of file