Console.ReadLine reads empty string on Island (windows)

(Marko Zubin) #1

IDE: Water
Target: Island(Windows)
Console.ReadLine() waits for the enter key to be pressed as normal, but always returns an empty string

Expected Behavior:
It should return what was read from the console.

Actual Behavior:
It always returns a string with Length==0.

Steps are in Swift but the same happens with C#.

Compile this:

let str = Console.ReadLine()
writeLn(str) //empty
Console.WriteLine(str == nil ? “nil” : “not nil”) //not nil
if str != nil {
writeLn(str.Length) //0

Run from cmd or power shell.
Enter some text, press enter.
It always prints an empty line followed by “not nil” followed by 0. Irregardless of what the user enters.

(RemObjects) #2

Thanks, logged as bugs://81930

(RemObjects) #3

bugs://81930 got closed with status fixed.

(Carlo Kok) #4

If you need this right now, you can just apply this change to IslandRTL: