Skip to content
Snippets Groups Projects
Commit a22da939 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Parser.XML.Tree: Declare low_clone() as optional.

Fixes issues assigning eg a SimpleElementNode object to
a variable declared as a SimpleNode in strict_types mode.

Fixes [PIKE-122].
parent 9eaf1db7
No related branches found
No related tags found
No related merge requests found
......@@ -159,7 +159,6 @@ testfont binary
/lib/modules/Parser.pmod/Python.pmod foreign_ident
/lib/modules/Parser.pmod/RCS.pike foreign_ident
/lib/modules/Parser.pmod/SGML.pike foreign_ident
/lib/modules/Parser.pmod/XML.pmod/Tree.pmod foreign_ident
/lib/modules/Parser.pmod/XML.pmod/Validating.pike foreign_ident
/lib/modules/Parser.pmod/XML.pmod/testsuite.in foreign_ident
/lib/modules/Parser.pmod/module.pmod foreign_ident
......
#pike __REAL_VERSION__
/*
* $Id: Tree.pmod,v 1.72 2008/06/28 16:36:55 nilsson Exp $
* $Id$
*
*/
......@@ -283,7 +283,7 @@ class AbstractSimpleNode {
//! Returns an initialized copy of the node.
//! @note
//! The returned node has no children.
AbstractSimpleNode low_clone() {
optional AbstractSimpleNode low_clone() {
return AbstractSimpleNode();
}
......@@ -537,7 +537,7 @@ class AbstractNode {
//! Returns an initialized copy of the node.
//! @note
//! The returned node has no children, and no parent.
AbstractNode low_clone()
optional AbstractNode low_clone()
{
return AbstractNode();
}
......@@ -1309,7 +1309,7 @@ class SimpleNode
inherit VirtualNode;
// Needed for cross-overloading
SimpleNode low_clone()
optional SimpleNode low_clone()
{
return VirtualNode::low_clone();
}
......@@ -1323,7 +1323,7 @@ class Node
inherit VirtualNode;
// Needed for cross-overloading
Node low_clone()
optional Node low_clone()
{
return VirtualNode::low_clone();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment