Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Lenard Nagy
titan.core
Commits
f04bb339
Unverified
Commit
f04bb339
authored
Dec 11, 2020
by
Kristof Szabados
Committed by
GitHub
Dec 11, 2020
Browse files
Merge pull request #153 from ppank5/master
Bugfix: bug 568716 & 568742
parents
afeda039
7d37a297
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler2/ttcn3/Ttcnstuff.cc
View file @
f04bb339
...
...
@@ -3472,6 +3472,17 @@ namespace Ttcn {
local_def
->
error
(
"Cannot override final method `%s'"
,
base_def
->
get_fullname
().
c_str
());
}
else
if
(
local_func
->
is_identical
(
base_func
))
{
if
(
base_func
->
get_visibility
()
==
PUBLIC
&&
local_func
->
get_visibility
()
!=
PUBLIC
)
{
local_def
->
error
(
"Public methods can be only overridden by public methods `%s'"
,
local_id
.
get_dispname
().
c_str
());
}
else
if
(
base_func
->
get_visibility
()
==
NOCHANGE
&&
(
local_func
->
get_visibility
()
!=
PUBLIC
||
local_func
->
get_visibility
()
!=
NOCHANGE
))
{
local_def
->
error
(
"Protected methods can be only overridden by "
"public or protected methods `%s'"
,
local_id
.
get_dispname
().
c_str
());
}
}
break
;
}
default:
local_def
->
error
(
"%s shadows inherited member `%s'"
,
...
...
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