I may miss something, but with following Java inte...
# spring
s
I may miss something, but with following Java interface:
Copy code
public interface Expression {

    @Nullable
	Object getValue(EvaluationContext context, Object rootObject) throws EvaluationException;

    @Nullable
	<T> T getValue(EvaluationContext context, @Nullable Class<T> desiredResultType) throws EvaluationException;
}
And following Kotlin code
val value = expression.getValue(context, String::class.java)
, the method used is the first variant, not the second (with IDEA 2019.2 and Kotlin 1.3.41). Why?
🤔 1
m
I had a similar problem with this.
I wanted to use the last one... But it would always take some other... That was because of T, and I couldn't really figure out what was going on...
s
Hum, any existing bug referenced? Sounds like a surprising and big interop issue.
m
I fixed by adding a when checking for the class type and the compiler got the right one... Lemme find it
image.png
I wanted to pass that "parameter" in the end... But it would always default to the overrides that only had 3 parameters
s
Ok I will ask ok #general and if no more info I will create an issue
m
Yep... It does look like it's a inference thing... Once I made sure the of the viewClass class, it allowed it as a parameter and got the right override.
s
I tried to disable the new inference but same result