Skip to content

Commit 67c3acf

Browse files
committed
Add test case
The first test ensures that the mirror is generated. The second test will not have mirrors generated.
1 parent 50b1c12 commit 67c3acf

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

tests/pos/i10769.scala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,4 @@ trait STMLike[F[_]] {
1313
case class Abort(error: Throwable) extends Txn[Nothing]
1414
case object Noop extends Txn[Nothing]
1515
}
16-
17-
class Foo {
18-
case class Abort(error: Throwable) extends Txn[Nothing]
19-
case object Noop extends Txn[Nothing]
20-
}
2116
}

tests/pos/i10769b.scala

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package stm
2+
3+
trait STMLike[F[_]] {
4+
import Internals._
5+
6+
sealed abstract class Txn[+A] {}
7+
8+
object Txn {
9+
def abort[A](e: Throwable): Txn[A] = Abort(e)
10+
}
11+
12+
object Internals {
13+
case class Abort(error: Throwable) extends Txn[Nothing]
14+
case object Noop extends Txn[Nothing]
15+
}
16+
17+
class Foo {
18+
case class Abort(error: Throwable) extends Txn[Nothing]
19+
case object Noop extends Txn[Nothing]
20+
}
21+
}

0 commit comments

Comments
 (0)