Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eclipse Projects
Eclipse Titan
titan.core
Commits
edb33cbb
Commit
edb33cbb
authored
Feb 15, 2018
by
Kristof Szabados
Committed by
Gerrit Code Review
Feb 15, 2018
Browse files
Merge "Fixed segmentation fault caused by name reuse (TR# 902064)"
parents
e5d87882
88dba5f9
Changes
3
Hide whitespace changes
Inline
Side-by-side
compiler2/ttcn3/AST_ttcn3.cc
View file @
edb33cbb
...
...
@@ -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'"
,
...
...
function_test/Semantic_Analyser/template/TempImp_OK.ttcn
0 → 100644
View file @
edb33cbb
/******************************************************************************
* 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
;
}
function_test/Semantic_Analyser/template/TempNameReuse_SE.ttcn
0 → 100644
View file @
edb33cbb
/******************************************************************************
* 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//
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment