i can’t figure out the rule here:

this compiles

`trait UpdateOutletAssignment[R <: MongoRecord[R] with HasOutlet[R] with HasDealer[R], T <: HasOrIsRecord[R]] extends CSVMeta[T] {`

while this doesn’t

trait UpdateOutletAssignment[R <: MongoRecord[R], T <: HasOrIsRecord[R with HasOutlet[R] with HasDealer[R]]] extends CSVMeta[T] {

the error is the case if failure is

type arguments [R with net.veact.util.db.HasOutlet[R] with net.veact.util.db.HasDealer[R]] do not conform to trait HasOrIsRecord’s type parameter bounds [T <: net.liftweb.mongodb.record.MongoRecord[T]]

[error] trait UpdateOutletAssignment[R <: MongoRecord[R], T <: HasOrIsRecord[R with HasOutlet[R] with HasDealer[R]]] extends CSVMeta[T] {

the problematic trait is defind as

trait HasOrIsRecord[T <: MongoRecord[T]]

in summary, this works:

trait Foo[A <: X with Y, B <: C[A]]

while this doesn’t

trait Foo[A <: X, B <: C[A with Y]]

if C is defined as trait C[T <: X]

why? the final type parameter of B is the exact same