WebAssembly / component-model

Repository for design and specification of the Component Model
Other
971 stars 81 forks source link

Static methods on resources don't have any validation on the resource name #182

Closed alexcrichton closed 1 year ago

alexcrichton commented 1 year ago

Currently I think this is a valid component:

(component
  (import "[static]a.b" (func)))

since there's no validation about [static]... annotated-functions other than "it's a function". There could be no resources named a, though, in the component or there could be multiple (e.g. named through different paths through instances).

lukewagner commented 1 year ago

Oops, yes, thanks, that's missing from the validation rules.

lukewagner commented 1 year ago

I realized writing #190 that an above bullet (rewritten by #190) covers all the annotated name cases, thereby implying the above.

lukewagner commented 1 year ago

I think this is resolved, so closing, but feel free to reopen if not.