Skip to content

Component validation doesn't handle type ascription of resource exports correctly #2731

Open

Description

@alexcrichton

Currently this component is rejected, but it should be valid

(component
  (type $r (resource (rep i32)))
  (export "r1" (type $r))
  (export "r2" (type $r) (type (sub resource)))
)

and similarly:

(component
  (import "i" (instance $i
    (export "r" (type $r (sub resource)))
    (export "f" (func (param "x" (own $r))))
  ))
  (export "j" (instance $i) (instance
    (export "r" (type $r (sub resource)))
    (export "f" (func (param "x" (own $r))))
  ))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    component-modelIssues related to the implementation of the component model

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions