Don't force inheritance of ignored methods
If a symbol is ignored in the base class, it shouldn't appear in the derived class neither.
This commit is contained in:
parent
d89a95a48c
commit
65d9cad1ca
1 changed files with 2 additions and 2 deletions
|
|
@ -1303,8 +1303,8 @@ ready:
|
||||||
|| (Cmp(Getattr(node, "kind"), "function") == 0)) {
|
|| (Cmp(Getattr(node, "kind"), "function") == 0)) {
|
||||||
if ((Cmp(Getattr(node, "access"), "public") == 0)
|
if ((Cmp(Getattr(node, "access"), "public") == 0)
|
||||||
&& (Cmp(Getattr(node, "storage"), "static") != 0)) {
|
&& (Cmp(Getattr(node, "storage"), "static") != 0)) {
|
||||||
// Assignment operators are not inherited in C++.
|
// Assignment operators are not inherited in C++ and symbols without sym:name should be ignored, not copied into the derived class.
|
||||||
if (Cmp(Getattr(node, "name"), "operator =") != 0) {
|
if (Getattr(node, "sym:name") && Cmp(Getattr(node, "name"), "operator =") != 0) {
|
||||||
Node *new_node = copy_node(node);
|
Node *new_node = copy_node(node);
|
||||||
String *parent_name = Getattr(parentNode(node), "name");
|
String *parent_name = Getattr(parentNode(node), "name");
|
||||||
Hash *dupl_name_node = is_in(Getattr(node, "name"), n);
|
Hash *dupl_name_node = is_in(Getattr(node, "name"), n);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue