Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example in README with @file:Import fails #418

Open
rameshvenk opened this issue Jan 31, 2024 · 0 comments
Open

Example in README with @file:Import fails #418

rameshvenk opened this issue Jan 31, 2024 · 0 comments

Comments

@rameshvenk
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant