Closed nezuo closed 2 months ago
unknown can't be used everywhere. Specifically, I found that it can't be used as map keys or values.
unknown
map
https://zap.redblox.dev/playground.html?code=ZXZlbnQgdmFsdWUgPSB7DQogICAgZnJvbTogU2VydmVyLA0KICAgIHR5cGU6IFJlbGlhYmxlLA0KICAgIGNhbGw6IFNpbmdsZVN5bmMsDQogICAgZGF0YTogbWFwIHsgW3N0cmluZ106IHVua25vd24gfSwNCn0NCg0KZXZlbnQga2V5ID0gew0KICAgIGZyb206IFNlcnZlciwNCiAgICB0eXBlOiBSZWxpYWJsZSwNCiAgICBjYWxsOiBTaW5nbGVTeW5jLA0KICAgIGRhdGE6IG1hcCB7IFt1bmtub3duXTogc3RyaW5nIH0sDQp9
unknown should not be a map key as unknown could be nil in zap. I'm also undecided if it's bug for for map values. I'll leave this open for now as I think about it.
nil
Describe the bug
unknown
can't be used everywhere. Specifically, I found that it can't be used asmap
keys or values.Reproduction
https://zap.redblox.dev/playground.html?code=ZXZlbnQgdmFsdWUgPSB7DQogICAgZnJvbTogU2VydmVyLA0KICAgIHR5cGU6IFJlbGlhYmxlLA0KICAgIGNhbGw6IFNpbmdsZVN5bmMsDQogICAgZGF0YTogbWFwIHsgW3N0cmluZ106IHVua25vd24gfSwNCn0NCg0KZXZlbnQga2V5ID0gew0KICAgIGZyb206IFNlcnZlciwNCiAgICB0eXBlOiBSZWxpYWJsZSwNCiAgICBjYWxsOiBTaW5nbGVTeW5jLA0KICAgIGRhdGE6IG1hcCB7IFt1bmtub3duXTogc3RyaW5nIH0sDQp9