Reputation: 40
I'm trying to create a Scala trait that is used as the base trait for a number of parsers. I have a number of case classes that will store the parsed datasets. All of these case classes extend the Parseable trait.
Some of the classes will return
Array[C <: Parseable]
others
Dataset[C <: Parseable]
How do I define the Parser trait so that the parse() function returns either of the above data structures?
Upvotes: 0
Views: 403