我有我的设计问题: 我有一些基类 public class ReportConfig<T> where T: class
{
public string ReportSavePath { get; set; }
public string ReportTitle { get; set; }
public T ReportData { get; set; }
}
我想创建一个基类,可以继承和用于雏菊链调用,但我需要返回的对象是派生类。 考虑: Public Class MyElement
Public Function SetAttribute(name As String, value As String) As MyElement
// Set the attribute
Return Me
End Func
trait Mixin {
class P
}
abstract class SuperClass[T]
class Impl extends SuperClass[P] with Mixin
的类成员参数化超级类得到: not found: type P
是否有任何方式来提供构件类P其混合在作为参数传递给一个超类,或这是不可能因为评估的顺序(或其他一些问题?)。