summaryrefslogtreecommitdiff
path: root/test/files/pos/implicit-unwrap-tc.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-06-13 20:51:57 +0000
committerPaul Phillips <paulp@improving.org>2011-06-13 20:51:57 +0000
commitb6d1953b85bddc7ccd748fa8f8aa2b7d3eb1f194 (patch)
treeb39ca3818b4803af062b561bc5342f8a7334e718 /test/files/pos/implicit-unwrap-tc.scala
parent32d2b15d5db3e9e582632cc8f995dcc362751d6a (diff)
downloadscala-b6d1953b85bddc7ccd748fa8f8aa2b7d3eb1f194.tar.gz
scala-b6d1953b85bddc7ccd748fa8f8aa2b7d3eb1f194.tar.bz2
scala-b6d1953b85bddc7ccd748fa8f8aa2b7d3eb1f194.zip
Test case for implicits which unwrap typeclasse...
Test case for implicits which unwrap typeclasses, something which must really live on the edge given the multiple ways we've busted it lately. Also some Array/signature and repl tests. No review.
Diffstat (limited to 'test/files/pos/implicit-unwrap-tc.scala')
-rw-r--r--test/files/pos/implicit-unwrap-tc.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/files/pos/implicit-unwrap-tc.scala b/test/files/pos/implicit-unwrap-tc.scala
new file mode 100644
index 0000000000..1afde26613
--- /dev/null
+++ b/test/files/pos/implicit-unwrap-tc.scala
@@ -0,0 +1,10 @@
+trait NewType[X]
+
+object Test {
+ // change return type to Foo and it compiles.
+ implicit def Unwrap[X](n: NewType[X]): X = sys.error("")
+ class Foo(val a: Int)
+ def test(f: NewType[Foo]) = f.a
+}
+
+