Полагаю, я создал минимальный пример
type T_MAX_LATTICE[T] = T;
trait C_TEST_COLL[T_Result, T_T] extends C_TYPE[T_Result] with C_TINY[T_Result] {
type T_IntegerMaxLattice;
val t_IntegerMaxLattice: C_TYPE[T_IntegerMaxLattice] with C_MAX_LATTICE[T_IntegerMaxLattice, T_Integer];
type T_Integers;
val t_Integers: C_TYPE[T_Integers] with C_SET[T_Integers, T_Integer];
}
class M_TEST_COLL[T_T](name : String,val t_T : C_TYPE[T_T] with C_TINY[T_T])
extends Module(name)
with C_TEST_COLL[T_T,T_T] {
val t_Result: this.type = this;
val t_IntegerMaxLattice = new M_MAX_LATTICE[T_Integer]("IntegerMaxLattice", /*t_Integer,*/ 0);
type T_IntegerMaxLattice = T_MAX_LATTICE[T_Integer];
val t_Integers = ???/*new M_SET[T_Integer]("Integers",t_Integer);*/
type T_Integers /*= /*TI*/T_SET[T_Integer];*/
}
trait C_TYPE[T_Result] /*extends C_BASIC[T_Result] with C_PRINTABLE[T_Result]*/
trait C_TINY[T_Result] extends C_TYPE[T_Result]
trait C_MAX_LATTICE[T_Result, T_TO] /*extends C_MAKE_LATTICE[T_Result,T_TO]*/
type T_Integer = Int
// val t_Integer = new M_INTEGER("Integer")
trait C_SET[T_Result, T_ElemType] extends C_TYPE[T_Result] /*with C_COMPARABLE[T_Result] with C_COLLECTION[T_Result,T_ElemType] with C_ABSTRACT_SET[T_Result,T_ElemType] with C_COMBINABLE[T_Result]*/
class Module(val mname : String)
class M_MAX_LATTICE[T_TO]
(name : String, /*t_TO:C_ORDERED[T_TO],*/v_min_element : T_TO)
/*extends M_MAKE_LATTICE[T_TO](name,t_TO,v_min_element,
new M__basic_3[ T_TO](t_TO).v__op_z,
new M__basic_3[ T_TO](t_TO).v__op_z0,
new M__basic_13[ T_TO](t_TO).v_max,
new M__basic_13[ T_TO](t_TO).v_min)
with C_MAX_LATTICE[T_TO,T_TO] with C_ORDERED[T_TO]*/
Полагаю, ошибка компиляции очевидна. Вы пытаетесь присвоить new M_MAX_LATTICE[T_Integer]...
типа M_MAX_LATTICE[Int]
для t_IntegerMaxLattice
, переопределяя значение другого типа.
Если вы сделаете класс M_MAX_LATTICE
extension trait C_TYPE
ваш код, кажется, компилируется
class M_MAX_LATTICE[T_TO]
(name : String, t_TO:C_ORDERED[T_TO],v_min_element : T_TO)
extends M_MAKE_LATTICE[T_TO](name,t_TO,v_min_element,
new M__basic_3[ T_TO](t_TO).v__op_z,
new M__basic_3[ T_TO](t_TO).v__op_z0,
new M__basic_13[ T_TO](t_TO).v_max,
new M__basic_13[ T_TO](t_TO).v_min)
with C_MAX_LATTICE[T_TO,T_TO] with C_ORDERED[T_TO]
with C_TYPE[T_TO] //added
{
val v_less = t_TO.v_less;
val v_less_equal = t_TO.v_less_equal;
val v_assert: T_TO => Unit = ??? //added
val v_node_equivalent: (T_TO, T_TO) => T_OrLattice = ??? //added
val v_string: T_TO => String = ??? //added
}