MG
Size: a a a
MG
AM
AL
MG
open class A() {}
class B: A() {}
fun a(v: A) {}
a(B())AM
AM
A should be open class or abstract class or interface in your example, as the code you've provided won't even compile.AM
MG
Type mismatch: inferred type is VectorBase<Type> but VectorCore<Any> was expectedopen class VectorCore<Type> {}
open class VectorBase<Type>: VectorCore<Type> {
fun elementWiseOperation(vector: VectorCore<Any>, action: (result: VectorCore<Any>, lhs: Any, rhs: Any) -> Unit): VectorCore<Any> {}
fun t() {
val A = elementWiseOperation(this) {}
}
}AM
Any? instead of Any.AM
VectorCore<Type: Any> if you aren't going to work with nulls.AL
Type mismatch: inferred type is VectorBase<Type> but VectorCore<Any> was expectedopen class VectorCore<Type> {}
open class VectorBase<Type>: VectorCore<Type> {
fun elementWiseOperation(vector: VectorCore<Any>, action: (result: VectorCore<Any>, lhs: Any, rhs: Any) -> Unit): VectorCore<Any> {}
fun t() {
val A = elementWiseOperation(this) {}
}
}AM
Generic<T> implicitly means Generic<T: Any?>, which is not a subtype of Generic<Any>.MG
MG
AM
MG
nullD
FileHelperImpl : DataProvider немного отдает.FileHelper как контейнер для утилитных методов.DataProvider<>.AM
MG
as UnionClassD