diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/t2946/MyResponseCommon_2.scala | 7 | ||||
-rw-r--r-- | test/files/run/t2946/ResponseCommon_1.scala | 13 |
2 files changed, 20 insertions, 0 deletions
diff --git a/test/files/run/t2946/MyResponseCommon_2.scala b/test/files/run/t2946/MyResponseCommon_2.scala new file mode 100644 index 0000000000..4f8f924f2c --- /dev/null +++ b/test/files/run/t2946/MyResponseCommon_2.scala @@ -0,0 +1,7 @@ +class MyResponseCommon extends Parser with ResponseCommon + +object Test { + def main(args: Array[String]) { + new MyResponseCommon + } +} diff --git a/test/files/run/t2946/ResponseCommon_1.scala b/test/files/run/t2946/ResponseCommon_1.scala new file mode 100644 index 0000000000..bb921e7027 --- /dev/null +++ b/test/files/run/t2946/ResponseCommon_1.scala @@ -0,0 +1,13 @@ +class Parser { + def parse(t: Any): Unit = {} +} + +trait ResponseCommon extends Parser { + private[this] var paramsParser: Parser = null + def withParamsParser(parser: Parser) = {paramsParser = parser; this} + + override abstract def parse(t: Any): Unit = t match { + case ("params", value: List[_]) => value.foreach {paramsParser.parse(_)} + case _ => super.parse(t) + } +} |