Commit edb33cbb authored by Kristof Szabados's avatar Kristof Szabados Committed by Gerrit Code Review
Browse files

Merge "Fixed segmentation fault caused by name reuse (TR# 902064)"

parents e5d87882 88dba5f9
......@@ -4311,6 +4311,7 @@ namespace Ttcn {
void Def_Template::chk()
{
if (checked) return;
checked = true;
Error_Context cntxt(this, "In template definition `%s'",
id->get_dispname().c_str());
const string& t_genname = get_genname();
......@@ -4350,7 +4351,6 @@ namespace Ttcn {
}
type->chk_this_template_ref(body);
checked = true;
Type *t = type->get_type_refd_last();
if (t->get_typetype() == Type::T_PORT) {
error("Template cannot be defined for port type `%s'",
......
/******************************************************************************
* Copyright (c) 2000-2017 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:
* Baranyi, Botond
*
******************************************************************************/
module TempImp_OK {
type integer T;
}
/******************************************************************************
* Copyright (c) 2000-2017 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:
* Baranyi, Botond
*
******************************************************************************/
module TempNameReuse_SE { //^In TTCN-3 module//
import from TempImp_OK all;
template T T := 1; //^In template definition// //is not a reference to a type//
}
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