Skip Menu |
Report information
Id: 127842
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: cpan [at] zoffix.com
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [LTA ERROR] Smileys on return still results in non-smiley types in error message
Download (untitled) / with headers
text/plain 981b
As can be seen from the eval below, I specified Int:U as return value of a sub, but the error message still calls it just "Int", resulting in a confusing error. <ZoffixW> m: sub foo returns Int:U { 42 }; foo; <camelia> rakudo-moar 600eb5: OUTPUT«Type check failed for return value; expected Int but got 42␤ in sub foo at /tmp/eErpXMejSF line 1␤ in block <unit> at /tmp/eErpXMejSF line 1␤␤» It's even more confusing with a :D smiley: <ZoffixW> m: sub foo returns Int:D { my Int $x; $x }; foo; <camelia> rakudo-moar 600eb5: OUTPUT«Type check failed for return value; expected Int but got Int␤ in sub foo at /tmp/fhHB17rE8B line 1␤ in block <unit> at /tmp/fhHB17rE8B line 1␤␤» The error message should include the smiley on the type, as it does for variables: <ZoffixW> m: my Int:U $x = 42; <camelia> rakudo-moar 600eb5: OUTPUT«Type check failed in assignment to $x; expected Int:U but got Int (42)␤ in block <unit> at /tmp/D3t9RObZ2u line 1␤␤»
Still present in Rakudo version 2016.06-154-g55c359e built on MoarVM version 2016.06-9-g8fc21d5


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org