Skip to content

string.new*, string.const, string.concat should produce non-nullable results #42

Open
@jakobkummerow

Description

@jakobkummerow

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).)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions