I'm having a compiler error when I try to use prop...
# compiler
p
I'm having a compiler error when I try to use property access syntax instead of regular method setter. This is with using the Java XGBoost library.
Copy code
val dmat = DMatrix(features, features.size, 1, -1.0f)
dmat.label(labels) // generates compiler error
dmat.setLabel(labels) // works fine
The complier error is: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: public operator fun <T, R> DeepRecursiveFunction<TypeVariable(T), TypeVariable(R)>.invoke(value: TypeVariable(T)): TypeVariable(R) defined in kotlin Anyone knows what is causing this behavior?
i
Maybe
dmat.label = labels
is correct?
p
Not sure what I was thinking of, I guess got confused by error. But of course indeed that works. Thanks!!!