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
I attempted to do this like so to remove some code duplication:
@mutualrec
finaldeflastMatch(last: Option[(String, Try[NodeWrap])], eArgs: EnumArgs):Option[(String, Try[NodeWrap])] = last match {
caseSome((labelCarry: String, Success(node: NodeWrap)))
if!isLocallyDefined(node.node) =>// Keep chasing the reference//TODO: above, need to check to see if we need worry about non-head elements
unapply(NodeWrapCarry(node.node.child.head, eArgs, labelCarry))
case _ => last
}
// def unapply(arg: Node, eArgs: EnumArgs): Option[(String, Try[Node])] =// unapply(NodeWrap(arg, eArgs))////TODO: also looking up arg.fullName is not sufficient... need whole xpath?@mutualrec
finaldefunapply(arg0: NodeWrapAbstract):Option[(String, Try[NodeWrap])] = {
val (last, eArgs) = arg0 match {
case argNW@NodeWrap(arg: Node, eArgs: EnumArgs) =>
(unapplyMatcher(argNW, ""), eArgs)
caseNodeWrapCarry(arg: Node, eArgs: EnumArgs, label: String) =>
(unapplyMatcher(NodeWrap(arg, eArgs), label), eArgs)
}
lastMatch(last, eArgs)
}
}
However, this results in "Unable to tail call optimize as this is either not effectively final or a non-constructor method". The issue appears to be that different signatures in the mutual methods are not supported, currently a scalac convention.
The text was updated successfully, but these errors were encountered:
I attempted to do this like so to remove some code duplication:
However, this results in "Unable to tail call optimize as this is either not effectively final or a non-constructor method". The issue appears to be that different signatures in the mutual methods are not supported, currently a scalac convention.
The text was updated successfully, but these errors were encountered: