develooper Front page | perl.perl6.compiler | Postings from March 2012

[perl #111674] [BUG] Can't refer to a constant in RHS of the constant declaration in Rakudo

From:
Carl Mäsak
Date:
March 11, 2012 09:22
Subject:
[perl #111674] [BUG] Can't refer to a constant in RHS of the constant declaration in Rakudo
Message ID:
rt-3.6.HEAD-4610-1331482938-1158.111674-82-0@perl.org
# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #111674]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=111674 >


<masak> nom: constant catalan = 1, map { (4*$_ + 2) / ($_ + 2) *
catalan[$_] }, 0..*; .say for catalan[^10]
<p6eval> rakudo bd6fde: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined
routine '&catalan' called (line 1)␤»
<masak> nom: constant k = 1, map { k[$_] }, 0..*; .say for k[^10]
<p6eval> rakudo bd6fde: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined
routine '&k' called (line 1)␤»
* masak submits rakudobug
<masak> nom: constant k = k; say k
<p6eval> rakudo bd6fde: OUTPUT«===SORRY!===␤Could not find sub &k␤»
<masak> nom: constant k = 1; constant k2 = k; say k2
<p6eval> rakudo bd6fde: OUTPUT«1␤»



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About