doc icon indicating copy to clipboard operation
doc copied to clipboard

Coersion in return type checks are ENODOC

Open gfldex opened this issue 2 years ago • 1 comments

They are specced in S06-signature/type-capture.t as: sub ret_TDC(::T \t, $v --> T:D()) but apply to none-capture type constraints as well. Should be added in https://docs.raku.org/language/signatures#Return_type_arrow:_--> .

gfldex avatar Apr 23 '23 22:04 gfldex

In what Rakudo version did this get implemented? In

$ raku --version
Welcome to Rakudoâ„¢ v2022.06.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2022.06.

I run

my sub ret_TDC(::T \t, $v --> T:D()) { $v }
ret_TDC(Int, "12")

but get

===SORRY!=== Error while compiling /home/luis/coercion.raku
Cannot find method 'nominalize' on object of type Perl6::Metamodel::GenericHOW

uzluisf avatar Jun 03 '23 18:06 uzluisf