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

Owner: Nobody
Requestors: raiph <raiph.mellor [at] gmail.com>
Cc:
AdminCc:

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



Subject: `of' Type annotation NYI for `constant` declarator
Download (untitled) / with headers
text/plain 914b
my Int constant foo = 1 # should work and does in rakudo my constant foo of Int = 1 # should work and does not in rakudo ---- using #perl6 evalbot: r: my Int constant foo = 1 rakudo-parrot 5fe2db, rakudo-jvm 5fe2db, rakudo-moar 5fe2db: ( no output ) r: my constant foo of Int = 1 rakudo-jvm 5fe2db: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␀Wrong number of arguments passed; expected 1..1, but got 1␀at /tmp/tmpfile:1␀------> ␀» ..rakudo-moar 5fe2db: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␀Unexpected named parameter 'SYMBOL' passed␀at /tmp/tmpfile:1␀------> ␀» ..rakudo-parrot 5fe2db: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␀too many named arguments: 1 passed, 0 used␀at /tmp/tmpfile:1␀------> ␀» std: my constant foo of Int = 1 std 09dda5b: OUTPUT«ok 00:01 122m␀»
Download (untitled) / with headers
text/plain 258b
On Fri Feb 21 13:21:11 2014, raiph wrote: Show quoted text
> my Int constant foo = 1 # should work and does in rakudo
Hmm. It only appears to work. It actually compiles without error but ignores the type constraint: my Str constant foo = 1 # shouldn't work but does


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