# New Ticket Created by Paweł Pabian # Please include the string: [perl #76986] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=76986 >
[12:13] <bbkr> rakudo: my $ = 'a'; my $ = 4; # hmm [12:14] <p6eval> rakudo efe72c: OUTPUT«===SORRY!===Redeclaration of symbol $ at line 22, near " = 4; # hm"» [12:15] <sorear> my $ = 5 is absolutely legal [12:15] <sorear> it creates an anonymous variable [12:15] <sorear> it's most useful in parameter lists [12:16] <sorear> it prevents unused variable warnings [12:27] <bbkr> i know that "my $ = 5" is legal. still "my $ = 'a'; my $ = 4;" IMO should not warn about redeclaration, because symbol is anonymous :) [12:27] <moritz_> rakudo: my $ = 5; my $ = 7; say "alive" [12:28] <p6eval> rakudo efe72c: OUTPUT«===SORRY!===Redeclaration of symbol $ at line 22, near " = 7; say "» [12:28] <bbkr> same as ([1,2,3], [1,2,3]) is legal code and those are two anonymous arrays in the same scope [12:28] <moritz_> bbkr: that's right; it's a bug