A
Andrus
How to fix ?
Andrus.
code to reproduce:
namespace test {
class ModelGenericBase<T> { }
class GenericBaseForm<T> where T : ModelGenericBase<T> { }
class KlientEntity : ModelGenericBase<KlientEntity> { }
class KlientBase : KlientEntity { }
class test {
void tesxt() {
//Error 1 The type 'test.KlientBase' must be convertible to
// 'test.ModelGenericBase<test.KlientBase>' in order to use it as
// parameter 'T' in the generic type or method
// 'test.GenericBaseForm<T>'
GenericBaseForm<KlientBase> x;
}
}
}
Andrus.
code to reproduce:
namespace test {
class ModelGenericBase<T> { }
class GenericBaseForm<T> where T : ModelGenericBase<T> { }
class KlientEntity : ModelGenericBase<KlientEntity> { }
class KlientBase : KlientEntity { }
class test {
void tesxt() {
//Error 1 The type 'test.KlientBase' must be convertible to
// 'test.ModelGenericBase<test.KlientBase>' in order to use it as
// parameter 'T' in the generic type or method
// 'test.GenericBaseForm<T>'
GenericBaseForm<KlientBase> x;
}
}
}