Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-7853

Add short form type definition

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: PUP 5.2.0
    • Component/s: Type System
    • Labels:
      None
    • Release Notes:
      Not Needed
    • Release Notes Summary:
      Part of unreleased Pcore, and part of standalone tasks. To be released as part of tasks.
    • QA Risk Assessment:
      No Action

      Description

      Before this, a type alias of an Object type would have to be
      declared like this:

      type MyType = Object[{ ... }]
      

      This new feature makes the brackets optional for the Object type so that
      the above expression can be written:

      type MyType = Object { ... }
      

      This feature also makes the type reference Object optional and allows this to have the same meaning:

      type MyType = { ... }
      

      The Object can also be replaced by some other data type reference, in which case it
      becomes the parent type. Thus, this description:

      type MyType = Object[{ parent => ParentType, ... }]
      

      can now be written like this:

      type MyType = ParentType { ... }
      

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                henrik.lindberg Henrik Lindberg
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support