[perl #75316] 1...1..0 keeps Rakudo on 100% CPU usage

2014-09-23 Thread Christian Bartolomaeus via RT
The test for this ticket (which now resides in S03-sequence/basic.t) was fudged for rakudo (todo 'mysterious'). AFAIU the code { 1 ... () } now throws an exception (just like shifting one element from an empty list does). Therefore I changed the test (and unfudged it): throws_like { 1 ... ()

[perl #76998] [BUG] capture variable does not parse for building a pair of the form :$a

2014-09-24 Thread Christian Bartolomaeus via RT
This now has a test in S05-capture/match-object.t (cmp. https://github.com/perl6/roast/commit/15cd5a89f8fcfac7d0a3ae13afbc2c790316c8ef) All credits to timotimo, who explained both test and procedure to close this ticket: http://perl6advent.wordpress.com/2013/12/17/day-17-of-a-new-contributor/

[perl #99658] sequence operator '...' timeout

2014-09-24 Thread Christian Bartolomaeus via RT
Actually I don't think S03 says that '1,3,5 ... 8' should act as '1,3,5 ... *' As I understand it '1,3,5 ... 8' gives an infinite list with all even numbers. '1,3,5 ... *' also gives an infinite list with all even numbers -- but this one is lazy. So there is a difference in behaviour: When

[perl #120739] @a[*]:kv / %a{*}:kv - $k, $v dies

2014-09-25 Thread Christian Bartolomaeus via RT
I added a test to S03-operators/subscript-adverbs.t with the following commit: https://github.com/perl6/roast/commit/7f16f13f8c9610d57a6efb3eca0e846edbb6ed07

[perl #115726] sub infix: ( ){}; gives misleading error message about P5 diamond operator

2014-09-25 Thread Christian Bartolomaeus via RT
The test in S32-exceptions/misc.t passes and the test file is in 't/spectest.data'. If the ticket should not be set to resolved (if there is something else to do), please comment.

[perl #76608] [BUG] Bogus redeclaration error when doing a declaration inside a $() in an interpolating string in Rakudo

2014-09-25 Thread Christian Bartolomaeus via RT
stmuk added a test for this recently: https://github.com/perl6/roast/commit/b4fc0fe9f11bb34e4442da7e1f945e8740d07c7c I moved the test from S02-names-var/76608.t to S02-literals/misc-interpolation.t (which is in 't/spectest.data'). The test passes on all rakudo backends.

[perl #122842] segfault with moar with specific PERL6LIB and running a specific test file

2014-09-25 Thread Christian Bartolomaeus via RT
I tried to narrow the problem down, but was not very successful. With the attached file trans.t I can reproduce the segfault: $ PERL6LIB=$(pwd)/lib:. ./perl6-m trans.t alive Segmentation fault If I remove some variable declarations or the last say in that file, the segfault goes away. Even

[perl #77158] [BUG] Doing .perl on an :(Array of Int) signature produces an internal error in Rakudo

2014-09-25 Thread Christian Bartolomaeus via RT
I moved the test from S02-types/77158.t to S06-signature/types.t (which is in 't/spectest.data'). The test passes on all rakudo backends.

[perl #109800] [BUG] Can't declare infix operators using 'my infix:sth' syntax in Rakudo

2014-09-25 Thread Christian Bartolomaeus via RT
The test in S06-operator-overloading/sub.t passes and the test file is in t/spectest.data. If the ticket should not be set to resolved (if there is something else to do), please comment.

[perl #116348] [BUG] infix:... shouldn't autothread because of a junction in the RHS in Rakudo

2014-09-25 Thread Christian Bartolomaeus via RT
I added a test to S03-sequence/misc.t with the following commit: https://github.com/perl6/roast/commit/7f16f13f8c9610d57a6efb3eca0e846edbb6ed07

[perl #77522] Rakudo allows unspace in /\ X/ but STD doesn't

2014-09-25 Thread Christian Bartolomaeus via RT
The test in S32-exceptions/misc.t passes and the test file is in 't/spectest.data'. If the ticket should not be set to resolved (if there is something else to do), please comment.

[perl #99732] [BUG] Rakudo doesn't like .++

2014-09-26 Thread Christian Bartolomaeus via RT
I added a test to S03-operators/autoincrement.t with the following commit: https://github.com/perl6/roast/commit/3164e55750 (I didn't test the staff with $_='' though, but only incremented $_=4 with .++ once.)

[perl #122849] A * as last element does not extend list for infix:Z (zip)

2014-09-26 Thread Christian Bartolomaeus via RT
There was already a ticket for this problem (#122230). Also the test in question was a duplicate of a test in S03-metaops/zip.t -- which is handled in ticket #122230. I removed the redundant test from S03-operators/misc.t and I'm closing this ticket.

[perl #85750] Test failures on OpenBSD

2014-09-28 Thread Christian Bartolomaeus via RT
Hi, again it's been a while. I installed a current Rakudo on OpenBSD 5.5 (amd64) and happily most of the test failures didn't occur anymore. On Moar I had a clean spectest. On Parrot I had only one failure. (Please note, that I had to install ICU (pkg_add icu4c). Without that package some of

[perl #122649] Unneeded rebuilds on rakudo-moar

2014-09-29 Thread Christian Bartolomaeus via RT
This happens for all backends. AFAIU the reason is that we have a target m-runner-default (in the case of Moar) in our Makefile. This target is a dependency for target all and is therefore called when executing make. But since there is no file m-runner-default this target is considered out of

[perl #85750] Test failures on OpenBSD

2014-09-29 Thread Christian Bartolomaeus via RT
Just for the records: Looking a bit closer I saw that the failing tests in S03-operators/arith.t and S32-num/power.t (reported on 2013-06-03) where identical. Both test whether 1**Inf equals 1. Interestingly I got exactly those test failures on a current version of NetBSD (6.1.4):

[perl #75370] Enum name as type constraint is unreasonably strict

2014-09-30 Thread Christian Bartolomaeus via RT
stmuk added a test for this recently: https://github.com/perl6/roast/commit/b4fc0fe9f11bb34e4442da7e1f945e8740d07c7c I moved the test from S02-names/75370.t to S12-enums/basic.t (which is in 't/spectest.data').

[perl #113680] lack of semicolon at the end of a use ... statement throws internal error

2014-09-30 Thread Christian Bartolomaeus via RT
I added a test to S32-exceptions/misc.t with the following commit: https://github.com/perl6/roast/commit/afc4d1ee8aaa5a5a62ff728f2acbaf68f12da26c (Maybe it's a bit too specific, since it checks the exact error message.)

[perl #83430] [BUG] Rakudo throws a parse error instead of (like STD) a warning upon same-scope redeclaration of a variable

2014-10-01 Thread Christian Bartolomaeus via RT
There already was the following test in S04-declarations/multiple.t: eval_lives_ok 'my $x; my $x', 'it is legal to declare my $x twice in the same scope.'; I added the ticket number to the test. If there should be a better test, please reopen the ticket.

[perl #120061] [BUG] Rakudo on the JVM says 'Scalar'

2014-10-01 Thread Christian Bartolomaeus via RT
Looks like this is now implemented: $ perl6-m -e 'say [1,2,3].combinations(2).perl' ([1, 2], [1, 3], [2, 3]).list $ perl6-p -e 'say [1,2,3].combinations(2).perl' ([1, 2], [1, 3], [2, 3]).list $ perl6-j -e 'say [1,2,3].combinations(2).perl' ([1, 2], [1, 3], [2, 3]).list There are tests in

[perl #65900] 'my ($a is readonly) = 5' should be allowed, but assigning to it afterward should be disallowed; '(my $a is readonly) = 5' should also be disallowed... in Rakudo

2014-10-01 Thread Christian Bartolomaeus via RT
Things have changed and infix:::= is used instead of a variable trait is readonly. The tests for this ticket are gone with this commit: https://github.com/perl6/roast/commit/253242f3dd7ece23c6390a80cdcdf78b561cc973 my $a is readonly = 5; say $a; ===SORRY!=== Error while compiling Can't use

[perl #93982] [BUG] Errors from typed variable declaration with missing initializers

2014-10-01 Thread Christian Bartolomaeus via RT
This works now (probably for quite a while already): my Str ($a) = (); (Str) I added a test to S02-types/type.t with this commit: https://github.com/perl6/roast/commit/b93b78792bcd5a0fef75bd2676ed1eac3e330562

[perl #111964] [BUG] LTA error message when passing an Int argument to base conversion in Rakudo

2014-10-02 Thread Christian Bartolomaeus via RT
The error message now hopefully is adequat: my $x=31; say :8($x) You have confused the number 31 with the textual representation 31; if you wanted to render the number in the given base, use $number.base($radix) in block unit at unknown file:1 There is a test for the correct exception type

[perl #122842] segfault with moar with specific PERL6LIB and running a specific test file

2014-10-02 Thread Christian Bartolomaeus via RT
This was fixed in MoarVM today (cmp. http://irclog.perlgeek.de/perl6/2014-10-02#i_9446636 and http://irclog.perlgeek.de/perl6/2014-10-02#i_9447562).

[perl #112584] Passing command line options to “perl6” causes the USAGE automatic generation to print an incorrect program name

2014-10-03 Thread Christian Bartolomaeus via RT
This works now and it looks like it has been fixed for quite a while. IMHO this was the same problem as that from RT #113078 ([BUG] $*PROGRAM_NAME erroneously reports the first argument to 'perl6', even when this argument isn't a program name in Rakudo). Since there is a test in

[perl #112970] [BUG] LTA, misleading error message when a typed array in a signature fails to bind in Rakudo

2014-10-05 Thread Christian Bartolomaeus via RT
The error message now mentions that 'Positional[Int]' is expected: sub f(Int @x) {}; f( [] ) Type check failed in binding @x; expected 'Positional[Int]' but got 'Array' in sub f at unknown file:1 in block unit at unknown file:1 A test was added to S14-roles/parameterized-type.t with the

[perl #111956] [BUG] LTA error message when quantifier follows nothing in Rakudo

2014-10-05 Thread Christian Bartolomaeus via RT
The error message with nom is now Quantifier quantifies nothing: / * / ===SORRY!=== Error while compiling unknown file Quantifier quantifies nothing at unknown file:1 -- / *⏏ / expecting any of: statement list prefix or term prefix or meta-prefix / a+ + /

[perl #114968] Typed arrays do not check type during list assignement

2014-10-06 Thread Christian Bartolomaeus via RT
This dies now (probably for a while already). I added a test to S09-typed-arrays/arrays.t with the following commit: https://github.com/perl6/roast/commit/26af8f842f11d0fca1f0479c67c15b206d10fcd8

[perl #114726] [BUG] Cannot bind $/

2014-10-06 Thread Christian Bartolomaeus via RT
This works now (probably for a while already) with rakudo. I added a test to S05-match/capturing-contexts.t with the following commit: https://github.com/perl6/roast/commit/5fe25b6de871608354e73b3e26cdd388d15e4e08 Please note that I test 'my $/ := 42' instead of '$/ := 42' (which also works

[perl #119293] Rakudo doesn't warn about Perl 5 $]

2014-10-06 Thread Christian Bartolomaeus via RT
Unfortunately the error message is only Unexpected closing bracket now: 13:00 bartolin r: say $] 13:00 +camelia rakudo-{parrot,moar} 65819d: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Unexpected closing bracket␤at /tmp/tmpfile:1␤-- say $⏏]

[perl #71800] [BUG] empty groups in regexes should throw Null pattern not allowed at errors

2014-10-06 Thread Christian Bartolomaeus via RT
Now all of these die with X::Syntax::Regex::NullRegex. There are tests in S32-exceptions/misc.t.

[perl #115132] [BUG] cannot assign boolean evaluation to non-container

2014-10-07 Thread Christian Bartolomaeus via RT
Hi, this works now (probably for a while, already). I added a test to S04-declarations/constant.t with the following commit: https://github.com/perl6/roast/commit/6cc8c38a1c Please note: If you smart match agains a regex you don't get a boolean value but either a Match object or Nil: (foo

[perl #116643] [BUG] Null PMC access when declaring operator with a backslash in Rakudo

2014-10-07 Thread Christian Bartolomaeus via RT
On Moar and on JVM all of those declarations run fine. On Parrot the errors are still the same. I added tests (fudged for Parrot) for two of the different declarations to S06-operator-overloading/sub.t with the following commit: https://github.com/perl6/roast/commit/dea36c4818

[perl #116643] [BUG] Null PMC access when declaring operator with a backslash in Rakudo

2014-10-07 Thread Christian Bartolomaeus via RT
As FROGGS pointed out on IRC (http://irclog.perlgeek.de/perl6/2014-10-07#i_9469198) the behaviour on Parrot is not exactly as last year. I did a fresh build and now I get the Null PMC access errors only when putting the declaration in an extra block. (That's what happening in my tests where I

[perl #112988] excessive errors when foo.pl does not exist

2014-10-07 Thread Christian Bartolomaeus via RT
This looks better now: $ perl6-m foo Could not open foo. Failed to open file: no such file or directory $ perl6-p foo Could not open foo. Unable to open filehandle from path 'foo': No such file or directory(2) $ perl6-j foo Could not open foo. java.nio.file.NoSuchFileException: foo So, I'd say

[perl #115294] [BUG] Null PMC access when using variable in interpolated block in double-quoted string in regex in Rakudo

2014-10-07 Thread Christian Bartolomaeus via RT
This looks good now: It doesn't die anymore, but returns foo bar. $ perl6-m -e '$_ = foo bar; say m/ { $_ } /' 「foo bar」 $ perl6-p -e '$_ = foo bar; say m/ { $_ } /' 「foo bar」 $ perl6-j -e '$_ = foo bar; say m/ { $_ } /' 「foo bar」 I added a test to S05-mass/rx.t with the following commit:

[perl #77616] ~ operator in regexp reverts capture order, but it should not

2014-10-08 Thread Christian Bartolomaeus via RT
Current behaviour: say so abc ~~ /a ~ (c) (b)/; say $0, $1 True 「b」 「c」 As I understand S05 the ~ operator basically rewrites the above regex to /a (b) (c)/ and only then matching and capturing happens. So the question seems to be, whether numbering of subpatterns should be done before the

[perl #115502] [BUG] 'try' at BEGIN time hangs in Rakudo

2014-10-08 Thread Christian Bartolomaeus via RT
This does no longer hang. $ perl6-m -e 'BEGIN { try 0 }; say alive' alive $ perl6-p -e 'BEGIN { try 0 }; say alive' alive $ perl6-j -e 'BEGIN { try 0 }; say alive' alive I added a test to S04-phasers/begin.t with the following commit: https://github.com/perl6/roast/commit/05bf75e3b6

[perl #116695] [BUG] Wrong array length when Mu elements and delete interact in Rakudo

2014-10-08 Thread Christian Bartolomaeus via RT
It looks like deleting the last element of an array no longer deletes the undefined elements before it: my $foo = [0,1,2,3,4]; say $foo.elems; say $foo.perl 5 [0, 1, 2, 3, 4] $foo[4] = Any; $foo[3] = Any; say $foo.elems; say $foo.perl 5 [0, 1, 2, Any, Any] $foo[4] :delete; say $foo.elems; say

[perl #116314] [BUG] 'for' loops in phasers in 'for' loops don't run in Rakudo

2014-10-08 Thread Christian Bartolomaeus via RT
for loops in phasers in for loops are run now: for 1..2 { ENTER { .say for foo bar }; .say} foo bar 1 foo bar 2 I added a test to S04-phasers/enter-leave.t with the following commit: https://github.com/perl6/roast/commit/0a2c9a8008

[perl #116204] [BUG] Null PMC access when hitting 'last' in code block in regex in loop in Rakudo

2014-10-08 Thread Christian Bartolomaeus via RT
There is no longer a Null PMC access error when hitting 'last' in code block in regex in loop: $ perl6-m -e 'repeat while False { foo ~~ / f { say got here } o { last } / }; say after the loop' got here after the loop $ perl6-p -e 'repeat while False { foo ~~ / f { say got here } o { last } /

[perl #77738] [bug] is rw on slurpy parameters

2014-10-08 Thread Christian Bartolomaeus via RT
This works now: sub incr1 (*@v is rw) { @v[0]++; @v[1]++; }; my ($a, $b) = (0, 0); incr1($a, $b); say incr1: $a, $b; incr1: 1, 1 sub incr2 (*@v is rw) { for @v { $_++} }; my ($a, $b) = (0, 0); incr2($a, $b); say incr2: $a, $b; incr2: 1, 1 sub incr3 (*@v is rw) { for @v - $x is rw { $x++

[perl #113964] [BUG] LTA error message when passing to a typed slurpy array parameter in Rakudo

2014-10-08 Thread Christian Bartolomaeus via RT
The error message looks adequate now: $ perl6 -e 'sub foo(Int *@ints) {}' ===SORRY!=== Error while compiling -e Slurpy positionals with type constraints are not supported. at -e:1 -- sub foo(Int *@ints⏏) {} expecting any of: formal parameter constraint But as it was

[perl #116096] [BUG] Set.new erroneously flattens arrays in Rakudo

2014-10-08 Thread Christian Bartolomaeus via RT
Arrays are no longer flattened by Set.new: say set(([1, 2], [3, 4])).perl set([1, 2],[3, 4]) I added a test to S02-types/set.t with the following commit: https://github.com/perl6/roast/commit/e8fd9ec55d

[perl #118387] [BUG] LEAVE doesn't trigger when an exception is thrown

2014-10-09 Thread Christian Bartolomaeus via RT
The described problem (no 'OK' is printed) persists on Parrot but works fine on Moar and JVM: $ perl6-p -e 'sub foo { LEAVE { say OK }; die died }; foo()' 2/dev/null $ perl6-m -e 'sub foo { LEAVE { say OK }; die died }; foo()' 2/dev/null OK $ perl6-j -e 'sub foo { LEAVE { say OK }; die died };

[perl #116695] [BUG] Wrong array length when Mu elements and delete interact in Rakudo

2014-10-09 Thread Christian Bartolomaeus via RT
Well, this bug is gone, then. I added a test to S32-array/delete.t with the following commit: https://github.com/perl6/roast/commit/f386c96536 I had (and have) some difficulties to find the references in the spec for the correct behaviour -- especially with regard to the following quotes from

[perl #116607] [BUG] LTA internal error when forgetting initialization assignment on backslash-variable declaration in Rakudo

2014-10-09 Thread Christian Bartolomaeus via RT
The error message matches that of STD now: $ perl6-m -e 'my \foo' ===SORRY!=== Error while compiling -e Term definition requires an initializer at -e:1 -- my \foo⏏EOL expecting any of: scoped declarator I added a test to S32-exceptions/misc.t with the following commit:

[perl #77616] ~ operator in regexp reverts capture order, but it should not

2014-10-09 Thread Christian Bartolomaeus via RT
Thanks for the feedback. I added a fudged test to S05-metachars/tilde.t with the following commit: https://github.com/perl6/roast/commit/f15d9aed26

[perl #117481] [BUG] duplicate keys in .gist in Match of regex which backtracked in Rakudo

2014-10-10 Thread Christian Bartolomaeus via RT
There is no longer a duplicate key in the .gist output: $ perl6-m -e say ('/foo/bar/baz/' ~~ m/^ $dirname=(.* '/'+)? $basename=(-[\/]+) '/'* $ /).gist 「/foo/bar/baz/」 dirname = 「/foo/bar/」 basename = 「baz」 I added a test to S02-names-vars/list_array_perl.t (couldn't find a better place) with

[perl #112988] excessive errors when foo.pl does not exist

2014-10-10 Thread Christian Bartolomaeus via RT
I added a test (using is_run) to S19-command-line/arguments.t with the following commit: https://github.com/perl6/roast/commit/3cee096456 S19-command-line/arguments.t is a new file in roast and as such not yet included in t/spectest.data in Rakudo. I'll leave the ticket open until that is

[perl #115390] Crash (abort or segfault) when using 'but' in a loop

2014-10-10 Thread Christian Bartolomaeus via RT
These error reports are difficult to assess from one or two years later. I'm inclined to say the bugs are fixed -- though there seems to exists another bug regarding the use of but in a for loop. But one at a time: $ perl6-m -e 'for 1..100 - $i { say $i; run true; 1; }' 1 [ ... output

[perl #116933] Glibc: double free or memory corruption crash running t/spec/S02-types/bool.t in Rakudo 2013.02.1-7-gb205e66

2014-10-11 Thread Christian Bartolomaeus via RT
Since the tests in S02-types/bool.t pass, the relevant problem seems to be the for loop with 0 but Bool::True. I don't see any crashes within the first 100 iterations, but on Parrot I get segfaults or crashes with around 262 iterations. On Moar and JVM there are no problems: $ perl6-m -e '(0

[perl #117043] [BUG] Null PMC access when declarator with multiple variables contain sigilless in Rakudo

2014-10-11 Thread Christian Bartolomaeus via RT
The assignment to a sigilless in a () no longer results in a Null PMC access error -- but the sigilless doesn't contain the correct value after assignment: $ perl6-m -e 'my ($x0, \x1) = (1, 2); say $x0; say x1' 1 (Any) $ perl6-m -e 'my (\x1) = 1; say x1' (Any) $ perl6-m -e 'my \x1 = 1; say x1'

[perl #112678] [BUG] 'div' for Ints truncates towards 0 when it should round down in Rakudo

2014-10-11 Thread Christian Bartolomaeus via RT
This works now: $ perl6-m -e 'say (-8) div 3' -3 I added a test to S03-operators/div.t with the following commit: https://github.com/perl6/roast/commit/d03302f512

[perl #111924] [BUG] Negative-index Failure over-eagerly triggers even for Whatever-y indexings in Rakudo

2014-10-11 Thread Christian Bartolomaeus via RT
The current error message is kind of funny and supports masak's assumption that * getting expanded as 0, and then the failure triggers (wrongly): $ perl6-m -e 'my @array; say @array[*-1]' Unsupported use of [-1] subscript to access from end of Array; in Perl 6 please use [*-1] (An exception of

[perl #114000] Re: IO stat exception when using :l

2014-10-13 Thread Christian Bartolomaeus via RT
Testing for a symlink with ~~:l on a non-existent file works now (returns False, but doesn't die). I added a test to S16-filehandles/filetest.t with the following commit: https://github.com/perl6/roast/commit/58ec1cfdbb

[perl #115248] [BUG] Cannot read lines from STDIN with current Parrot

2014-10-13 Thread Christian Bartolomaeus via RT
Looks like this issue has been handled and fixed in Parrot for some time: https://github.com/parrot/parrot/issues/860 and https://github.com/parrot/parrot/issues/861. Since the Parrot issues are closed I'm closing this ticket as well. (Hope that's okay, otherwise please reopen.)

[perl #74946] %h.delete() in right side of expression causes left side key missing

2014-10-13 Thread Christian Bartolomaeus via RT
This works now (using current syntax -- e.g. :delete): $ perl6-m -e 'my %h = a = b; %h{a} = %h{a} :delete; say %h.perl;' (a = b).hash I added a test to S32-hash/delete-adverb.t with the following commit: https://github.com/perl6/roast/commit/96c87780f7

[perl #77338] [BUG] Rakudo erroneously parses some optional-parameter question marks as twigils

2014-10-13 Thread Christian Bartolomaeus via RT
This looks good to me now: $ perl6-m -e 'sub foo(::T $?) {}; say alive' alive $ perl6-m -e 'role A[::T $?] {}; class B does A[] {}; say alive' alive The following dies, but that's okay (from the IRC log above: TimToady you can't put ? on a type constraint, which ::T is parsed as). $ perl6-m

[perl #77670] [BUG] .. no longer recognized as meaning the same as . in Rakudo

2014-10-13 Thread Christian Bartolomaeus via RT
As Matthew mentioned this works now. .. and . behave the same again: $ perl6-m -e 'say ( { 1 + 1 }, { 2 + 2 } )..().perl' (2, 4) $ perl6-m -e 'say ( { 1 + 1 }, { 2 + 2 } ).().perl' (2, 4) I added a test to S03-metaops/hyper.t with the following commit:

[perl #77668] [BUG] Can't call Callable objects in a list in parallel using the .() [or ()] form in Rakudo

2014-10-13 Thread Christian Bartolomaeus via RT
Now the first code snippet also seems to work: $ perl6-m -e 'sub infix:+-*/($a, $b) { ( { $a + $b }, { $a - $b }, { $a * $b }, { $a / $b } ).() }; say 5+-*/2;' 7 3 10 2.5 I added a test for that one to S03-metaops/hyper.t with the following commit:

[perl #77338] [BUG] Rakudo erroneously parses some optional-parameter question marks as twigils

2014-10-13 Thread Christian Bartolomaeus via RT
The tests are in S06-signature/optional.t and S14-roles/parameterized-basic.t, respectively. They were added with the following commit: https://github.com/perl6/roast/commit/2b3bee5223

[perl #80614] [Bug] chained array item assignment leaves one item undefined

2014-10-13 Thread Christian Bartolomaeus via RT
I tried to golf this (chained assignment and test failure) a bit and found the following: $ perl6-m -e 'my $x; $x = 1; my @a; my $y = @a[0] = 2; say @a[0]' 2 $ perl6-m -e 'my $x; ($x) = 1; my @a; my $y = @a[0] = 2; say @a[0]' (Any) The following looks weird as well: $ perl6-m -e 'my $y; my @a

[perl #78068] [BUG] REPL crashes when you use $* type variables.

2014-10-13 Thread Christian Bartolomaeus via RT
Possibly this is related to the issues in ticket #122914 (bindings and term definitions are forgotten in the REPL for subsequent lines).

[perl #83508] [BUG] Failed ()? captures should be Nil in Rakudo (nqp-rx)

2014-10-14 Thread Christian Bartolomaeus via RT
This works now (again): $ perl6-m -e 'x ~~ /(y)? (z)*/; say $0.defined; say $1.defined;' False True I added a test to S05-match/capturing-contexts.t with the following commit: https://github.com/perl6/roast/commit/ae245a65f6

[perl #88748] [BUG] Rakudo doesn't give a good indication of what's happened when an undeclared type is used in a 'when' clause

2014-10-14 Thread Christian Bartolomaeus via RT
As it was noted recently, Rakudo now gives the same error message as STD. I added a test to S32-exceptions/misc.t with the following commit: https://github.com/perl6/roast/commit/7396503e24 and I'm closing the ticket.

[perl #92822] [BUG] - $a\ .\ chop bug

2014-10-14 Thread Christian Bartolomaeus via RT
On the note of Pepe Schwarz I'm closing this ticket. (The test is passing and it's in t/spectest.data.) $ perl6-m -e 'my $a = helloo; $a = $a\ .\ chop; say $a;' hello

[perl #111734] [BUG] Can't locally redefine True in Rakudo

2014-10-14 Thread Christian Bartolomaeus via RT
Great, redefinition of truth works as expected! I added a test to S04-declarations/constant.t with the following commit: https://github.com/perl6/roast/commit/c855d94be4

[perl #113988] [BUG] Null PMC access when doing .fmt on the return value from .reals

2014-10-14 Thread Christian Bartolomaeus via RT
Since this was all about .sprintf being called with only one argument but two directives (also cmp. #106594) and since the Null PMC access error is gone, this ticket could be closed IMHO. On the other hand the error from sprintf doesn't look very awesome in the given case: $ perl6-m -e

[perl #114428] [BUG] Subroutines created using 'sub ::(some_constant)' get the wrong name in Rakudo

2014-10-14 Thread Christian Bartolomaeus via RT
Since this works and is in roast for two years I'm closing the ticket. $ perl6-m -e 'constant name = foo; sub ::(name) () { 42 }; say foo()' 42 $ perl6-m -e 'constant name = foo; say (sub ::(name) () { 42 }).name' foo

[perl #114456] [BUG] Invocation '()' after sub declaration doesn't parse in Rakudo (but does in STD)

2014-10-14 Thread Christian Bartolomaeus via RT
This works now: $ perl6-m -e 'say sub { 5 }()' 5 $ perl6-m -e 'sub ($t) { say $t }(arf)' arf I added tests to S02-lexical-conventions/sub-block-parsing.t with the following commit: https://github.com/perl6/roast/commit/09ff5366a3

[perl #115566] [BUG] Variables declared in quasi blocks don't work in Rakudo

2014-10-14 Thread Christian Bartolomaeus via RT
Just an update: Parrot no longer segfaults, but Moar does: $ perl6-m -e 'macro foo { quasi { my $a = OH HAI; say $a } }; foo' Segmentation fault $ perl6-p -e 'macro foo { quasi { my $a = OH HAI; say $a } }; foo' Cannot assign to an immutable value in any at -e:1 in block unit at -e:1 $

[perl #115842] [BUG] Comma can't be last in a compilation unit in Rakudo

2014-10-14 Thread Christian Bartolomaeus via RT
I added tests to S04-statements/terminator.t with the following commit: https://github.com/perl6/roast/commit/1c4c5355d9

[perl #116182] [BUG] 's;' wrongly parsed as subroutine call in Rakudo

2014-10-14 Thread Christian Bartolomaeus via RT
As I understand this bug report, the problem was this: doy r: sub s () { given 9 { return 0 when $_ %% 3; 1 } }; say s; p6eval rakudo c8de2e: OUTPUT«0␤» As the subject says the s; was parsed as a subroutine call by Rakudo. Back in 2012 the bug could have been shown a bit shorter: $ perl6 -e

[perl #116182] [BUG] 's;' wrongly parsed as subroutine call in Rakudo

2014-10-15 Thread Christian Bartolomaeus via RT
I added two tests (for parsing s; and m;) to S02-names-vars/names.t with the following commit: https://github.com/perl6/roast/commit/9cafef7ce7

[perl #117045] [BUG] Guillemet form of subscript parses as infix hyperop in Rakudo

2014-10-15 Thread Christian Bartolomaeus via RT
I agree with Mouq and after adding a test to S03-operators/misc.t with commit https://github.com/perl6/roast/commit/1e08ea21cc I'm now closing the ticket.

[perl #117097] [BUG] say $!.WHAT fails in CATCH block

2014-10-15 Thread Christian Bartolomaeus via RT
say $!.WHAT in CATCH block no longer dies, but it gives Nil. The exception is available in $_: $ perl6-m -e '{ die 42; CATCH { say $!.WHAT; say $_.perl } }' Nil X::AdHoc.new(payload = 42) 42 in block unit at -e:1 S04/Exception handlers says An exception handler is just a switch statement on

[perl #117465] [BUG] unspace after unspace causes error message which (erroneously) expects unspace in Rakudo

2014-10-15 Thread Christian Bartolomaeus via RT
As the tests in S02-lexical-conventions/unspace.t run fine, I'm closing this ticket.

[perl #117695] It is possible to alias ... by using the term syntactic category -- broken

2014-10-15 Thread Christian Bartolomaeus via RT
This now dies with Term definition requires an initializer: $ perl6-m -e 'my \term:a = 1;' ===SORRY!=== Error while compiling -e Term definition requires an initializer at -e:1 -- my \term⏏:a = 1; expecting any of: scoped declarator It works with STD: $ viv -c -e 'my \term:a =

[perl #117773] [BUG] KeyBag accepts non-UInt values in Rakudo

2014-10-15 Thread Christian Bartolomaeus via RT
This has changed. The former KeyBag is a BagHash now and the code snippet no longer generates a key a with a value b. Instead it generates a key of type Pair (a = b) with the corresponding value 1: $ perl6-m -e 'my $a = BagHash.new( (a=b) ); for $a.kv - $key, $val { say $key, isa ,

[perl #117915] [BUG] X metaoperator fails with bag keys

2014-10-15 Thread Christian Bartolomaeus via RT
This works now (on Moar, Parrot and JVM): $ perl6 -e 'my Bag $bag .= new: foo foo bar; for $bag.keys X $bag.keys - $a, $b { say $a, $b }' foofoo foobar barfoo barbar I added a test to S02-types/bag.t with the following commit: https://github.com/perl6/roast/commit/245c5988e7

[perl #117997] [BUG] STD warns about no-argument use of 'set' listop, Rakudo doesn't

2014-10-15 Thread Christian Bartolomaeus via RT
Rakudo (on Moar, Parrot and JVM) now gives the same error as STD: $ perl6 -e 'set;' ===SORRY!=== Error while compiling -e The 'set' listop may not be called without arguments (please use () or whitespace to clarify) at -e:1 -- set⏏; expecting any of: argument list $ perl6 -e

[perl #118037] .exists returns false on a %h{Any} in a TypedHash

2014-10-15 Thread Christian Bartolomaeus via RT
I added a test to S09-hashes/objecthash.t with the following commit: https://github.com/perl6/roast/commit/85396dd33e

[perl #118029] Stash.new creates Hash, not a Stash

2014-10-15 Thread Christian Bartolomaeus via RT
I added tests to S02-types/declare.t and S02-types/stash.t with the following commit: https://github.com/perl6/roast/commit/658c9604e7 Since the latter file is not yet included in Rakudo's t/spectest.data I'll leave the ticket open until that is done.

[perl #117773] [BUG] KeyBag accepts non-UInt values in Rakudo

2014-10-15 Thread Christian Bartolomaeus via RT
I added a test for the first example to S02-types/baghash.t with the following commit: https://github.com/perl6/roast/commit/502f2ca59d After staring at it for a while I'm no longer convinced that the following should result in an empty BagHash: $ perl6-m -e 'my $a = BagHash.new( a=b ); say

[perl #117773] [BUG] KeyBag accepts non-UInt values in Rakudo

2014-10-15 Thread Christian Bartolomaeus via RT
FROGGS explained on #perl6 why the empty BagHash is correct: FROGGS bartolin: the bare a will result in a named argument, where the quoted a will construct a pair and pass that FROGGS bartolin: and methods (like .new in this case) happily eat named (optional by default) arguments, which is

[perl #118063] [BUG] comma (wrongly) required between parameter with default value and returns-arrow ('--') in Rakudo

2014-10-15 Thread Christian Bartolomaeus via RT
This works now without the comma: $ perl6-m -e 'sub a ( $a=1 -- Hash ) { say $a; my %h }; say a(2)' 2 ^^ empty string here ;-) I added a test to S06-signature/defaults.t with the following commit: https://github.com/perl6/roast/commit/4485db4547

[perl #118075] [BUG] $, in list interpreted as '$,' variable rather than bare sigil $ + comma

2014-10-15 Thread Christian Bartolomaeus via RT
This works now: $ perl6-m -e 'my ($a, $c); ($a, $ , $c) = 1..3; say $a; say $c' 1 3 Also, S02 was modified recently (https://github.com/perl6/specs/commit/aadf0589905c9d76488fd81f738201d12f6d9eeb) and the new version explicitly allows the use of ($a, $, $c) = 1..3; I added a test to

[perl #114696] [BUG] $_ variable disappears after Rakudo sees block in for @array - $variable {}

2014-10-16 Thread Christian Bartolomaeus via RT
Since this works as expected, I added a test to S04-declarations/implicit-parameter.t with the following commit: https://github.com/perl6/roast/commit/7192d95e4b and I'm closing this ticket.

[perl #118231] Importing the same thing twice shouldn't bomb

2014-10-16 Thread Christian Bartolomaeus via RT
Since it's now possible to import the same thing twice, I added a test to S11-modules/import.t with the following commit: https://github.com/perl6/roast/commit/02a309ec81 and I'm closing the ticket.

[perl #118067] [BUG] Null PMC access when calling .new on a subclass with a proto overriding the regular .new in Rakudo

2014-10-16 Thread Christian Bartolomaeus via RT
Just an update: There is no longer a Null PMC access error, but Rakudo complains about no matching signature: $ perl6-m -e 'class A is Any { proto method new($) {*} }; A.new(now)' Cannot call 'new'; none of these signatures match: in block unit at -e:1 $ perl6-p -e 'class A is Any { proto

[perl #118581] [BUG] Segfault for a signature match with a native type and an 'as' cast in Rakudo

2014-10-16 Thread Christian Bartolomaeus via RT
This no longer segfaults but gives False (on Moar, Parrot and JVM): $ perl6 -e 'say \(1) ~~ :(int $x as Str)' False Is that smart match supposed to return True? (For the tests it would be nice to check for the correct result and not only whether it lives_ok.)

[perl #119061] .push and .unshift do not do typechecks

2014-10-16 Thread Christian Bartolomaeus via RT
Since this works now I've added 3 tests to S09-typed-arrays/arrays.t with the following commit: https://github.com/perl6/roast/commit/ece637835e For the last example (my Int @a=foo bar;) there was already a test (written for ticket 114968). I'm closing this ticket now.

[perl #118875] [BUG] 'where' clause followed by (non-parenthesized) expression with '' in it doesn't parse in parameter list in Rakudo

2014-10-16 Thread Christian Bartolomaeus via RT
This parses now (on Moar, Parrot and JVM): $ perl6 -e 'sub ndr($r where ($r ||= 10) 0 1) { }; say alive' alive I added a test to S06-other/misc.t with the following commit: https://github.com/perl6/roast/commit/aeed867f01 and I'm closing the ticket.

[perl #75858] [BUG] Can't use a where clause on an attribute without surrounding name and where clause in parentheses in Rakudo

2014-10-16 Thread Christian Bartolomaeus via RT
All of the above parses now (on Moar, Parrot and JVM): $ perl6 -e 'class A { has ($.x where 1) }; say alive' alive $ perl6 -e 'class A { has $.x where 1 }; say alive' alive $ perl6-m -e 'class A { has $x where 1; }; say alive' alive $ perl6 -e 'class A { has Int $.color where 1|2; }; say

[perl #119215] [BUG] empty-list adverb on literal hash yields LTA, too-internal error message in Rakudo

2014-10-16 Thread Christian Bartolomaeus via RT
The error message is no longer too internal, but is it adequate enough? $ perl6-m -e '{}:' ## identical error with perl6-p ===SORRY!=== This type does not support positional operations $ perl6-j -e '{}:' ===SORRY!=== java.lang.RuntimeException: This type does not support positional

[perl #118755] [BUG] .grep 'is rw' but .first isn't in Rakudo

2014-10-16 Thread Christian Bartolomaeus via RT
This works now: $ perl6-m -e 'my @a = 1..10; @a.first(* %% 2).++; say @a' 1 3 3 4 5 6 7 8 9 10 I added a test for this (and for the example with grep) to S32-list/first.t and S32-list/grep.t, respectively, with the following commit: https://github.com/perl6/roast/commit/4295bfcfae

[perl #119121] [BUG] Heredoc indented with a tab doesn't de-indent properly in Rakudo

2014-10-17 Thread Christian Bartolomaeus via RT
I'm closing this ticket since this works now and there are tests in S02-literals/heredocs.t (cmp. commit https://github.com/perl6/roast/commit/978e4a8ac166821ab18a8c02c906063b6e489dd6) $ perl6 -e 'say (EVAL q:to/E/;\n\tfoo\n\tbar\n\tE) eq foo\nbar\n' True $ perl6 -e 'say (EVAL

[perl #120831] [BUG] LTA error message when declaring 'my Int a' in Rakudo

2014-10-17 Thread Christian Bartolomaeus via RT
Since the current error message looks reasonable to me (though different from STD's) I went ahead and added a test to S32-exceptions/misc.t with the following commit: https://github.com/perl6/roast/commit/5265f7d69e But: The new error message only happens with my Int a;. Without the semicolon

[perl #120232] [BUG] sprintf doesn't format %floats with many significant digits properly

2014-10-17 Thread Christian Bartolomaeus via RT
This works for Moar, Parrot and JVM: $ perl6 -e 'printf(%.50f, 1.115)' 1.115000 I added a test to S32-str/sprintf.t with the following commit: https://github.com/perl6/roast/commit/46ef5bf0e9. I'm closing the ticket.

  1   2   3   4   5   6   7   8   >