Closed
Description
let f = s => {
switch s {
| "\\" => "backslash"
| "\"" => "doublequote"
| _ => "other"
}
}
let s1 = "\\"
let s2 = "\""
actual output (by the latest playground as of today)
function f(s) {
switch (s) {
case "\\\"" :
return "doublequote";
case "\\\\" :
return "backslash";
default:
return "other";
}
}
var s1 = "\\";
var s2 = "\"";
I expect the two case
s to be case "\""
and case "\\"
instead. Not that escape sequences that are used outside the switch
-case
context are translated appropriately.
Metadata
Metadata
Assignees
Labels
No labels