Skip to content

The 'is copy' trait drops the type of Array objectsΒ #2160

Open
@frithnanth

Description

The Problem

sub c1(Complex @a) { say @a.WHAT }
sub c2(Complex @a is copy) { say @a.WHAT }

my Complex @a = 1+2i, 2+3i, 4+2i;
c1(@a); # prints (Array[Complex])
c2(@a); # prints (Array)

Expected Behavior

(Array[Complex])
(Array[Complex])

Actual Behavior

(Array[Complex])
(Array)

Steps to Reproduce

See above

Environment

  • Operating system:
    Linux
  • Compiler version (perl6 -v):
    2018.06

Metadata

Assignees

No one assigned

    Labels

    Will be addressed in RakuASTThis issue will tentatively be addressed in RakuASTdata typesArrays, lists, hashes, pair objects, etc.traits

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions