You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With Scala 2.9.2 you could extend a scala.xml.Node and create your own class. When you use toString, the default case would print out the custom Node much like an Elem, since this was the catch all implementation.
Since this commit (see src/library/scala/xml/Utility.scala): scala/scala@e7ea29c
The behavior changed to printing Elem and throwing an exception when it was not one of the known sub-classes of Node.
This means the user can no longer extend the XML hierarchy with his own classes and use toString, since any XML tree that includes custom classes extending Node will throw exceptions on a toString.
The text was updated successfully, but these errors were encountered:
With Scala 2.9.2 you could extend a scala.xml.Node and create your own class. When you use toString, the default case would print out the custom Node much like an Elem, since this was the catch all implementation.
Since this commit (see src/library/scala/xml/Utility.scala): scala/scala@e7ea29c
The behavior changed to printing Elem and throwing an exception when it was not one of the known sub-classes of Node.
This means the user can no longer extend the XML hierarchy with his own classes and use toString, since any XML tree that includes custom classes extending Node will throw exceptions on a toString.
The text was updated successfully, but these errors were encountered: