Skip to content

Make native type and ref_to_native_type equivalent where ref_to_native_type is not a legal value #18532

@Astara

Description

@Astara

Make Explicit Sigil and Ref to Same, Equivalent
(where refs to a type are not legal values)

  • Wherever the language currently requires a value of type Array or a value of type Hash will allow a reference to the same type.

  • Any place where the language allows more than one type, will allow a reference to one of those allowed types.

Note: *This feature request excludes indeterminate behaviors. Also, this not the same as the previous "autoderef" feature, as it had been modified to allow overload operators associated with blessed packages. The original autoderef feature did not allow blessed packages and neither would this one. More than once I've asked when the change to allow blessed packages was inserted into the code (as it was the reason this feature was declared invalid), yet no one seemed to be able to point to the discussion where changing this to allow such references existed.

In any event, since this feature doesn't allow blessed packages, it cannot be used with overloading.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions