-
-
Save adamalix/10d1430e28b504b3baff to your computer and use it in GitHub Desktop.
commented out ast garbage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Override the constructor for Group so that it gobbles nested Groups, ie | |
// Group(Group(foo))) => Group(foo) | |
// Fails to compile with 'method apply is defined twice' | |
object Group { | |
def apply[T](items: Query[T]) = { | |
new Group(Phrase("asdf"))} | |
items match { | |
case x: Group[_] => items | |
case x => new Group(x) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment