Skip to content

Commit

Permalink
add a case for #34
Browse files Browse the repository at this point in the history
  • Loading branch information
tribbloid committed Oct 4, 2023
1 parent b88bfd1 commit 29080e4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/test/scala/splain/builtin/BasicSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ class BasicSpec extends SpecBase.Direct with BasicFixture {

check(LongArg)

describe("#34") {
check(compoundDiff, numberOfErrors = 0)
}

describe("#111") {

check(LongRefined)
Expand Down
15 changes: 15 additions & 0 deletions core/src/testFixtures/scala/splain/builtin/BasicFixture.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ class StaticBasicSpec extends Acceptance.SpecBase {

check(LongArg)

describe("#34") {
check(compoundDiff, numberOfErrors = 0)
}

describe("#111") {

check(LongRefined)
Expand Down

0 comments on commit 29080e4

Please sign in to comment.