# New Ticket Created by  Aaron Sherman 
# Please include the string:  [perl #128861]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=128861 >


These two commands (circa rakudo-moar 146e18) have different output:

$ perl6 -e 'class Foo { method bar(--> Str:D) {} }; say Foo.^methods.map:
{"{.name}={.WHAT.perl}, returns {.returns.perl}"}'
(bar=Method, returns Str:D)
$ perl6 -e 'class Foo { method bar() returns Str:D {} }; say
Foo.^methods.map: {"{.name}={.WHAT.perl}, returns {.returns.perl}"}'
(bar=Method+{Callable[Str:D]}, returns Str:D)

But it seems as if they should have the same output.

This also came up here:

https://github.com/rakudo/rakudo/pull/798

Relevant IRC log:

[11:12] <smls> m: my method bar() returns Str {};  say &bar.^name;
[11:12] <+camelia> rakudo-moar 146e18: OUTPUT«Method+{Callable[Str]}␤»
[11:12] <smls> m: my method bar(--> Str) {};  say &bar.^name;
[11:12] <+camelia> rakudo-moar 146e18: OUTPUT«Method␤»
[11:13] == telex [[email protected]] has quit [Ping timeout: 258
seconds]
[11:13] <harmil> Uh... am I misunderstanding what "returns" is for or does
that not make any sense?
[11:13] <smls> harmil: Seems weird to me too
[11:13] <smls> A leaking implementation detail maybe?
[11:14] <harmil> methinks
[11:14] <ugexe> there are odd differences between (--> RetType) and returns
RetType that shouldnt exist



--
Aaron Sherman, M.:
P: 617-440-4332 Google Talk, Email and Google Plus: [email protected]
Toolsmith, developer, gamer and life-long student.

Reply via email to