Hi,
I’m disrupted with kotlin version installed.
first version with a bug ki-shell 0.5.2 and :
C:\Users\Laurent>kotlinc -version
info: kotlinc-jvm 1.5.30-release-408 (JRE 18.0.1.1+2-6)
C:\Users\Laurent>java --version
java 18.0.1.1 2022-04-22
Java(TM) SE Runtime Environment (build 18.0.1.1+2-6)
Java HotSpot(TM) 64-Bit Server VM (build 18.0.1.1+2-6, mixed mode, sharing)
C:\Users\Laurent>C:\Users\Laurent\Desktop\ki\bin\ki.bat -version
java version "18.0.1.1" 2022-04-22
Java(TM) SE Runtime Environment (build 18.0.1.1+2-6)
Java HotSpot(TM) 64-Bit Server VM (build 18.0.1.1+2-6, mixed mode, sharing)
C:\Users\Laurent>C:\Users\Laurent\Desktop\ki\bin\ki.bat
ki-shell 0.5.2/1.7.0
type :h for help
[0] var x: String?=null
[1] x = readln()
[2] x?.length
res2: Int = 7
[3] x
res3: String = 123456
[4]
Second version installed (android canary)
F:\android-studio-canary\android-studio\plugins\Kotlin\kotlinc\bin>kotlinc -version
info: kotlinc-jvm 1.7.0-release-for-android-studio (JRE 18.0.1.1+2-6)
F:\android-studio-canary\android-studio\plugins\Kotlin\kotlinc\bin>java -version
java version "18.0.1.1" 2022-04-22
Java(TM) SE Runtime Environment (build 18.0.1.1+2-6)
Java HotSpot(TM) 64-Bit Server VM (build 18.0.1.1+2-6, mixed mode, sharing)
F:\android-studio-canary\android-studio\plugins\Kotlin\kotlinc\bin>kotlinc
Welcome to Kotlin version 1.7.0-release-for-android-studio (JRE 18.0.1.1+2-6)
Type :help for help, :quit for quit
>>> var x: String?=null
>>> x = readln()
x = readln()123456
>>> x?.length
res2: kotlin.Int? = 6
>>>
With python when I run a script in python console or when I run script from system console results are always equals
Here 1.7.0 in ki-shell is not Kotlin version 1.7.0 in kotlinc. It’s very disturbing
How do you manage this to ensure that ki-shell and kotlinc are identical?