This piece of code type checks:
x :: String
x = {"𝌆": "hi"}."𝌆"
but generates invalid JS like so:
var x = {"\119558": "hi"}["\ud834\udf06"];
The issue here is that the key needs to be encoded as a surrogate pair just like the accessor is.
Just something I stumbled upon while trying to work through the String -> Text unicode issues.
This piece of code type checks:
but generates invalid JS like so:
The issue here is that the key needs to be encoded as a surrogate pair just like the accessor is.
Just something I stumbled upon while trying to work through the String -> Text unicode issues.