mirror of https://github.com/sbt/sbt.git
Test case for dependencies involving implicits and higher-kinds.
This is a pending test case for sbt/sbt#686 which tests if dependencies are track properly when it comes to implicit scope. This test is marked as pending because sbt does not track dependencies correctly in this case.
This commit is contained in:
parent
bda87c14f0
commit
7cca5422c4
|
|
@ -0,0 +1,3 @@
|
|||
import scala.languageFeature.higherKinds
|
||||
trait A
|
||||
object A
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
import scala.languageFeature.higherKinds
|
||||
trait A
|
||||
object A {
|
||||
implicit def m[MM[_], A]: MM[A] = ???
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
trait B extends A
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
object Test {
|
||||
implicitly[M[B]]
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
import scala.languageFeature.higherKinds
|
||||
|
||||
class M[A](a: A)
|
||||
object M {
|
||||
implicit def m[MM[_], A]: MM[A] = ???
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
# Tests if dependencies on implicit scope are tracked properly
|
||||
# We use higher kinded types in order to make type checker to
|
||||
# infer more and thus obscure true dependencies
|
||||
$ copy-file changes/A1.scala A.scala
|
||||
$ copy-file changes/B.scala B.scala
|
||||
$ copy-file changes/M.scala M.scala
|
||||
$ copy-file changes/C.scala C.scala
|
||||
> compile
|
||||
|
||||
$ copy-file changes/A2.scala A.scala
|
||||
-> compile
|
||||
|
||||
> clean
|
||||
-> compile
|
||||
Loading…
Reference in New Issue