kevinherron
03/29/2021, 8:24 PM/**
* Get the value of the OutputArguments Property, if it exists.
*
* @return the value of the OutputArguments Property, if it exists.
* @see MethodNodeProperties#OutputArguments
*/
@Nullable
public Argument[] getOutputArguments() {
return getProperty(MethodNodeProperties.OutputArguments).orElse(null);
}
Now in some Kotlin code that uses this library it is inferring the type to be Array<Argument?>?
instead of Array<Argument>?
as it did previously. So now what was once:
override fun getOutputArguments(): Array<Argument> = methodNode.outputArguments ?: emptyArray()
now won't compile unless it's changed to something like this:
override fun getOutputArguments(): Array<Argument> {
val outputArguments: Array<Argument>? =
methodNode.outputArguments as Array<Argument>?
return outputArguments ?: emptyArray()
}
kevinherron
03/29/2021, 8:28 PMkevinherron
03/29/2021, 8:29 PMaraqnid
03/29/2021, 8:58 PMArray<Argument!>?
absent any other information about the array elements being nullablekevinherron
03/29/2021, 9:04 PMkevinherron
03/29/2021, 9:14 PM