Ticket #1 (closed feature: fixed)

Opened 3 years ago

Last modified 3 months ago

Whether to have contexts where nullable annotations are not allowed

Reported by: jeffdyer Assigned to: anonymous
Type: feature Priority: major
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 3 years ago by fcheng

  • reporter changed from fcheng to jeffdyer

Changed 3 years ago by fcheng

  • owner deleted
  • component set to Proposals

Changed 3 years 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 3 years ago by jeffdyer

  • status changed from closed to reopened
  • resolution deleted

Changed 3 years ago by jeffdyer

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

Changed 3 months ago by anonymous

  • milestone deleted

Milestone M0 deleted

Note: See TracTickets for help on using tickets.