diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-09-27 09:04:30 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-09-27 09:04:30 +0200 |
commit | 7fe9a7c34bd424029b5727b1521458d848578449 (patch) | |
tree | cf1d2abc8b4e8d5a8eb631954b9024db3c3e4571 /test/files/pos | |
parent | 0aaf59149871f817a67c1fefcc3b0457fcb5e4fc (diff) | |
parent | 9f62900145029786457f27c1fe3083cde5d83fe2 (diff) | |
download | scala-7fe9a7c34bd424029b5727b1521458d848578449.tar.gz scala-7fe9a7c34bd424029b5727b1521458d848578449.tar.bz2 scala-7fe9a7c34bd424029b5727b1521458d848578449.zip |
Merge remote-tracking branch 'origin/2.10.x' into merge/2.10.x-to-master-2
Conflicts:
bincompat-backward.whitelist.conf
bincompat-forward.whitelist.conf
build.xml
src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
src/library/scala/concurrent/Future.scala
src/reflect/scala/reflect/internal/Types.scala
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t7815.scala | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/files/pos/t7815.scala b/test/files/pos/t7815.scala new file mode 100644 index 0000000000..12a434c5b0 --- /dev/null +++ b/test/files/pos/t7815.scala @@ -0,0 +1,30 @@ +import language.higherKinds + +trait Foo[A <: AnyRef] { + type Repr + def f(a: A): Repr + def g(a: A): Option[Repr] + + type M[X] + def m(a: A): M[a.type] + + type Id[X] = X + def n(a: A): Id[(Repr, M[a.type])] + +} + +object Foo { + type Aux[A <: AnyRef, B] = Foo[A] { type Repr = B; type M[X] = Int } + +} + +object Main extends App { + def mapWithFoo[A <: AnyRef, B](as: List[A])(implicit foo: Foo.Aux[A, B]) = { + // Should be Eta expandable because the result type of `f` is not + // dependant on the value, it is just `B`. + as map foo.f + as map foo.g + as map foo.m + as map foo.n + } +} |