kscript icon indicating copy to clipboard operation
kscript copied to clipboard

Example in README with @file:Import fails

Open rameshvenk opened this issue 2 years ago • 0 comments

The @file:Import example failed with this error

error: platform declaration clash: The following declarations have the same JVM signature (median([Ljava/lang/Double;)D):[nl] fun Array<Double>.median(): Double defined in kscript.scriplet.Main[nl] fun Array<Double>.median(): Double defined in kscript.scriplet.Main[nl]private fun Array<Double>.median(): Double

Changing the example from val robustMean = listOf(1.3, 42.3, 7.0).median() to val robustMean = arrayOf(1.3, 42.3, 7.0).median() seems to have fixed the issue.

Description of environment

jdk, kotlin and kscript are installed via sdkman on Macbook M1 Pro


$ kscript --version
Version   : 4.2.3
Build     : 2023-07-22T13:06:02.327407526Z
Kotlin    : 1.9.21-release-633
Java      : JRE 21.0.2+13

rameshvenk avatar Jan 31 '24 14:01 rameshvenk