summaryrefslogtreecommitdiff
path: root/test/files/run/t2946/ResponseCommon.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t2946/ResponseCommon.scala')
-rw-r--r--test/files/run/t2946/ResponseCommon.scala14
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 100644
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)
+ }
+}
+