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

Unexpected result when using a type alias to a recursive variant.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • PUP 4.4.1
    • PUP 4.4.2
    • None
    • None
    • 1
    • Language 2016-04-06
    • Bug Fix
    • Hide
      Type aliases that included themselves recursively in a non meaningful way caused the created type to match anything. If you defined something like MyType = Variant[Integer, MyType], it would match anything. Now such constructs are correctly reduced to what they really mean.
      Show
      Type aliases that included themselves recursively in a non meaningful way caused the created type to match anything. If you defined something like MyType = Variant[Integer, MyType], it would match anything. Now such constructs are correctly reduced to what they really mean.

    Description

      I would expect this code:

      type MixedScalar = Variant[Integer, MixedScalar]
      notice(foo =~ MixedScalar)
      

      to output false. Instead it outputs true.

      ACCEPTANCE CRITERIA


      That the example above produces false.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              peter.huene Peter Huene
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support