Ticket #464 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

No semantics given for empty FunctionBody (section 13) or Program (section 14)

Reported by: David-Sarah Hopwood Assigned to: allen
Type: defect Priority: blocker
Component: Spec Version: 3.1
Keywords: semantics Cc: david-sarah@jacaranda.org

Description

In section 13, the FunctionBody production is defined (correctly) as SourceElements_opt, but the semantics is only given for FunctionBody : SourceElements (and refers to the "first" SourceElement within SourceElements, which may not exist).

Similarly for Program : SourceElements_opt in section 14.

Add to the end of section 13, after the paragraph for FunctionBody : SourceElements:

The production FunctionBody : [empty] is evaluated as follows:

  1. Return (normal, empty, empty).

Add to section 14, after the paragraph for Program : SourceElements:

The production Program : [empty] is evaluated as follows:

  1. Return (normal, empty, empty).

("[empty]" is in small type. Note that using [empty] in a semantics definition as an alternative for Foo_opt is correct; see StringNumericLiteral for a similar example.)

Attachments

Change History

Changed 1 year ago by allen

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.