diff --git a/core/src/test/scala/splain/builtin/BasicSpec.scala b/core/src/test/scala/splain/builtin/BasicSpec.scala index d2a19ca..49f35aa 100644 --- a/core/src/test/scala/splain/builtin/BasicSpec.scala +++ b/core/src/test/scala/splain/builtin/BasicSpec.scala @@ -10,6 +10,10 @@ class BasicSpec extends SpecBase.Direct with BasicFixture { check(LongArg) + describe("#34") { + check(compoundDiff, numberOfErrors = 0) + } + describe("#111") { check(LongRefined) diff --git a/core/src/testFixtures/scala/splain/builtin/BasicFixture.scala b/core/src/testFixtures/scala/splain/builtin/BasicFixture.scala index cf796d4..9438521 100644 --- a/core/src/testFixtures/scala/splain/builtin/BasicFixture.scala +++ b/core/src/testFixtures/scala/splain/builtin/BasicFixture.scala @@ -45,6 +45,21 @@ object Long { } """ + final val compoundDiff = + """ +object Compound { + trait T + type F[A] = A + def x[A](y: A): F[A with T] = y.asInstanceOf[A with T] + def f[A](a: A with String): F[A] = a + val y: F[Int with T] = x(x(1)) + f(y) + + val z: Int with T = x(x(1)) + f(z) +} + """ + final val LongRefined = """ object Long { diff --git a/testing/acceptance/src/test/scala/splain/acceptance/builtin/StaticBasicSpec.scala b/testing/acceptance/src/test/scala/splain/acceptance/builtin/StaticBasicSpec.scala index 9c1cb04..595d0a1 100644 --- a/testing/acceptance/src/test/scala/splain/acceptance/builtin/StaticBasicSpec.scala +++ b/testing/acceptance/src/test/scala/splain/acceptance/builtin/StaticBasicSpec.scala @@ -16,6 +16,10 @@ class StaticBasicSpec extends Acceptance.SpecBase { check(LongArg) + describe("#34") { + check(compoundDiff, numberOfErrors = 0) + } + describe("#111") { check(LongRefined)