stringref
stringref copied to clipboard
`string.new*`, `string.const`, `string.concat` should produce non-nullable results
Currently, the spec text for the various string creating instructions says that the result has type stringref
, e.g.:
(string.new_wtf8 $memory $wtf8_policy ptr:address bytes:i32)
-> str:stringref
(string.concat a:stringref b:stringref) -> stringref
With stringref
being nullable (contrary to initial assumptions?), that doesn't make a whole lot of sense: I think the result type should be a non-nullable (ref string)
instead.
(This would be similar to e.g. struct.new $t
, which also returns a non-nullable (ref $t)
.)