diff options
Diffstat (limited to 'test/files/run/t2946/ResponseCommon.scala')
-rwxr-xr-x | test/files/run/t2946/ResponseCommon.scala | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/files/run/t2946/ResponseCommon.scala b/test/files/run/t2946/ResponseCommon.scala new file mode 100755 index 0000000000..fa9d8acccb --- /dev/null +++ b/test/files/run/t2946/ResponseCommon.scala @@ -0,0 +1,14 @@ +trait ResponseCommon extends Parser { + private[this] var paramsParser: Parser = null + def withParamsParser(parser: Parser) = {paramsParser = parser; this} + + class Foo { + println(paramsParser) + } + + override abstract def parse(t: Any): Unit = t match { + case ("params", value: List[_]) => value.foreach {paramsParser.parse(_)} + case _ => super.parse(t) + } +} + |