diff options
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/implicit-unwrap-tc.scala | 10 |
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 +} + + |