IDE: Water
Version: 10.0.0.2363
Target: Island(Windows)
Description:
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:
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.