diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2010-03-10 17:43:20 +0000 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2010-03-10 17:43:20 +0000 |
commit | 6ee849b6eea1dbc3db46d8a87e82154dc7d1ebf7 (patch) | |
tree | eda4c11c107dac4ea2d4ef864eb6e63623a5cd54 /test/files/pos/t3152.scala | |
parent | 193df0b93d960b7e0e3f2a31e342720b0082e4df (diff) | |
download | scala-6ee849b6eea1dbc3db46d8a87e82154dc7d1ebf7.tar.gz scala-6ee849b6eea1dbc3db46d8a87e82154dc7d1ebf7.tar.bz2 scala-6ee849b6eea1dbc3db46d8a87e82154dc7d1ebf7.zip |
closes #3152: refactored adjustTypeArgs and met...
closes #3152: refactored adjustTypeArgs and methTypeArgs so that tparams
are correctly split into ones that were inferred successfully, and
that thus have a corresponding type argument, and those that weren't
determined
I didn't investigate the exact cause of the final error message in the
bug report, but Jason Zaugg's observations seems correct and I never
liked that uninstantiated buffer in the first place.
review by odersky
Diffstat (limited to 'test/files/pos/t3152.scala')
-rw-r--r-- | test/files/pos/t3152.scala | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/files/pos/t3152.scala b/test/files/pos/t3152.scala new file mode 100644 index 0000000000..a20428dbee --- /dev/null +++ b/test/files/pos/t3152.scala @@ -0,0 +1,20 @@ +trait Applicative[M[_]] + +sealed trait MA[M[_], A] { + def sequence[N[_], B](implicit a: A <:< N[B], n: Applicative[N]): N[M[B]] = error("stub") + // def sequence3[N[_], B]()(implicit a: A <:< N[B], n: Applicative[N]): N[M[B]] = error("stub") +} + +object test { + implicit def ListMA[A](l: List[A]): MA[List, A] = error("stub") + implicit val ao: Applicative[Option] = error("stub") + + /* This compiles OK: + (Nil: List[Option[Int]]).sequence3(): Option[List[Int]] + */ + + // BUG: error: immutable is not an enclosing class + // !!! No line number is reported with the error + (Nil: List[Option[Int]]).sequence: Option[List[Int]] + (List[Option[Int]]()).sequence: Option[List[Int]] +}
\ No newline at end of file |