summaryrefslogtreecommitdiff
path: root/test/files/pos/t6648.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2012-11-25 13:31:52 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2012-11-25 13:31:52 -0800
commitb8f06f33a420cf07f980cab61b2a11df6a0f5dca (patch)
tree939c690f926c712c68eff3f04c1f6c34bbea6bfc /test/files/pos/t6648.scala
parent8630176e985c5a8266d3afe4c4e3fb50d449630d (diff)
parentfaa6cfcf404b4d172f20b3ed01ba3bd59427b700 (diff)
downloadscala-b8f06f33a420cf07f980cab61b2a11df6a0f5dca.tar.gz
scala-b8f06f33a420cf07f980cab61b2a11df6a0f5dca.tar.bz2
scala-b8f06f33a420cf07f980cab61b2a11df6a0f5dca.zip
Merge pull request #1663 from paulp/merge-2.10.wip-x
Merge 2.10.0-wip into 2.10.x.
Diffstat (limited to 'test/files/pos/t6648.scala')
-rw-r--r--test/files/pos/t6648.scala24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/files/pos/t6648.scala b/test/files/pos/t6648.scala
new file mode 100644
index 0000000000..9593ebfee9
--- /dev/null
+++ b/test/files/pos/t6648.scala
@@ -0,0 +1,24 @@
+abstract class Node extends NodeSeq
+trait NodeSeq extends Seq[Node]
+object NodeSeq {
+ implicit def seqToNodeSeq(ns: Seq[Node]): NodeSeq = ???
+ def foo[B, That](f: Seq[B])(implicit bf: scala.collection.generic.CanBuildFrom[Seq[Int], B, That]): That = ???
+}
+
+class Transformer {
+ def apply(nodes: Any): Any = ???
+}
+
+object transformer1 extends Transformer {
+ // Adding explicit type arguments, or making the impilcit view
+ // seqToNodeSeq explicit avoids the crash
+ NodeSeq.foo {
+ // These both avoid the crash:
+ // val t = new Transformer {}; t.apply(null)
+ // new Transformer().apply(null)
+ new Transformer {}.apply(null)
+
+ null: NodeSeq
+ }: NodeSeq
+}
+