summaryrefslogblamecommitdiff
path: root/test/files/pos/implicit-unwrap-tc.scala
blob: 1afde26613f6b11d593688554c410118f8d2b497 (plain) (tree)
1
2
3
4
5
6
7
8
9
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
}