@@ -324,10 +324,10 @@ flags are set.
324
324
(See [ Import and Export Definitions] ( Explainer.md#import-and-export-definitions )
325
325
in the explainer.)
326
326
```
327
- import ::= en:<externname> ed:<externdesc> => (import en ed)
328
- export ::= en:<externname> si:<sortidx> => (export en si)
329
- externname ::= n:<name> u?:<URL>? => n u?
330
- URL ::= b*:vec(byte) => char(b)*, if char(b)* parses as a URL
327
+ import ::= en:<externname> ed:<externdesc> => (import en ed)
328
+ export ::= en:<externname> si:<sortidx> ed?:<externdesc>? => (export en si ed? )
329
+ externname ::= n:<name> u?:<URL>? => n u?
330
+ URL ::= b*:vec(byte) => char(b)*, if char(b)* parses as a URL
331
331
```
332
332
Notes:
333
333
* All exports (of all ` sort ` s) introduce a new index that aliases the exported
@@ -338,7 +338,10 @@ Notes:
338
338
parser] with ` char(b)* ` as * input* , no optional parameters and non-fatal
339
339
validation errors (which coincides with definition of ` URL ` in JS and ` rust-url ` ).
340
340
* Validation requires any exported ` sortidx ` to have a valid ` externdesc `
341
- (which disallows core sorts other than ` core module ` ).
341
+ (which disallows core sorts other than ` core module ` ). When the optional
342
+ ` externdesc ` immediate is present, validation requires it to be equal to
343
+ the inferred ` externdesc ` of the ` sortidx ` (where equality judges a type and
344
+ the ` typeidx ` of an export of that type (via ` eq ` or ` sub ` ) equivalent).
342
345
* The ` name ` fields of ` externname ` must be unique among imports and exports,
343
346
respectively. The ` URL ` fields of ` externname ` (that are present) must
344
347
independently unique among imports and exports, respectively.
0 commit comments