Skip to content

Commit 80e4b18

Browse files
Update Lucre community project
And add minimization
1 parent 0b0a4ce commit 80e4b18

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

tests/neg/lucre-23441-min.scala

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
trait Txn[T]
3+
trait Expr[X <: Txn[X], +Y]
4+
trait BinOp[T, Repr[X <: Txn[X]] <: Expr[X, T]]
5+
6+
trait IntObj[T] extends Expr[T, Int]
7+
trait IntBinOp extends BinOp[Int, IntObj]
8+
object IntEq extends IntBinOp
9+
10+
object Test:
11+
val r: BinOp[?, ?] = IntEq : BinOp[Int, IntObj] // error: Required: BinOp[?, ?[X] <: Expr[X, BinOp[?, ?]#T]]
12+
// We would need the second wildcard to "depend" on the 1st one,
13+
// e.g. have SomeBinop[?] where `type SomeBinop[X] = BinOp[X, ? <: [Y] =>> Expr[Y, X]]`,
14+
// but this is an instance of an unreducible application of higher-kinded type to a wildcard argument.
15+
// Also note there would be no error if we made BinOp covariant in T.

0 commit comments

Comments
 (0)