Ticket #1 (closed feature: fixed)

Opened 2 years ago

Last modified 1 year ago

Whether to have contexts where nullable annotations are not allowed

Reported by: jeffdyer Assigned to: anonymous
Type: feature Priority: major
Milestone: M0 Component: Proposals
Version: 4 Keywords:
Cc:

Description

Should there be contexts where nullable annotations are not allowed by the grammar? — Jeff Dyer 2006/12/15 08:38

   x to t?, x cast t?  // cast/to
    x is t?             // relational
    (t?).<u,v>          // type identifier
    {x:1}:t?            // object and array tags
    {x:x}:t? = o   // typed patterns

If we don’t allow ? then shouldn’t we disallow ! and make the type expression mean ! by default? Discussion in Wiki

Attachments

Change History

Changed 2 years ago by fcheng

  • reporter changed from fcheng to jeffdyer

Changed 2 years ago by fcheng

  • owner deleted
  • component set to Proposals

Changed 1 year ago by jeffdyer

  • status changed from new to closed
  • resolution set to fixed

Resolution: we have two type expression non-terminals, NullableTypeExpression? and TypeExpression?.

TypeExpression? occurs in the following contexts:

  • Annotating an object or array literal or pattern
  • Right side of 'cast', 'is', and 'to'
  • In a NullableTypeExpression?
  • In a parameterised type instantitation of the form ( TypeExpression? ) .< ... >

Changed 1 year ago by jeffdyer

  • status changed from closed to reopened
  • resolution deleted

Changed 1 year ago by jeffdyer

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