# New Ticket Created by Andrei Osipov # Please include the string: [perl #125412] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=125412 >
% perl6 -v This is perl6 version 2015.05-197-g28a7697 built on MoarVM version 2015.05-79-g458940f > sub x() returns Array of Int { my @x of Int = 1,2,3 }; sub x ( --> Array[Int]) { #`(Sub|42347328) ... } > x().WHAT.say Type check failed for return value; expected 'Array[Int]' but got 'Array[Int]' in any return_error at src/vm/moar/Perl6/Ops.nqp:639 in sub x at <unknown file>:1 in block <unit> at <unknown file>:1 Redeclaration of routine in REPL causes the following > sub x() returns Array of Int { return my @x of Int = 1,2,3 }; x().WHAT.say Type check failed for return value; expected 'Array[Int]' but got 'Array[Int]' in any return_error at src/vm/moar/Perl6/Ops.nqp:639 in sub x at <unknown file>:1 in block <unit> at <unknown file>:1 > sub x() returns Array of Int { return my @x of Int = 1,2,3 }; x().WHAT.say Type check failed for return value; expected 'Array[Int][Int]' but got 'Array[Int][Int]' in any return_error at src/vm/moar/Perl6/Ops.nqp:639 in sub x at <unknown file>:1 in block <unit> at <unknown file>:1 > sub x() returns Array of Int { return my @x of Int = 1,2,3 }; x().WHAT.say Type check failed for return value; expected 'Array[Int][Int][Int]' but got 'Array[Int][Int][Int]' in any return_error at src/vm/moar/Perl6/Ops.nqp:639 in sub x at <unknown file>:1 in block <unit> at <unknown file>:1 > sub x() returns Array of Int { return my @x of Int = 1,2,3 }; x().WHAT.say Type check failed for return value; expected 'Array[Int][Int][Int][Int]' but got 'Array[Int][Int][Int][Int]' in any return_error at src/vm/moar/Perl6/Ops.nqp:639 in sub x at <unknown file>:1 in block <unit> at <unknown file>:1 > sub x() returns Array of Int { return my @x of Int = 1,2,3 }; x().WHAT.say Type check failed for return value; expected 'Array[Int][Int][Int][Int][Int]' but got 'Array[Int][Int][Int][Int][Int]' in any return_error at src/vm/moar/Perl6/Ops.nqp:639 in sub x at <unknown file>:1 in block <unit> at <unknown file>:1