Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

throwing X::AdHoc "Cannot assign to a readonly variable or a value" instead of X::Parameter::RW #4713

Closed
p6rt opened this issue Nov 1, 2015 · 6 comments
Labels
JVM Related to Rakudo-JVM

Comments

@p6rt
Copy link

p6rt commented Nov 1, 2015

Migrated from rt.perl.org#126531 (status was 'resolved')

Searchable as RT126531$

@p6rt
Copy link
Author

p6rt commented Nov 1, 2015

From @coke

Many tests in S03-operators/increment.t are throwing ad hoc exceptions
instead of X​::Parameter​::RW

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Dec 30, 2017

From @usev6

On Sat, 31 Oct 2015 20​:35​:24 -0700, coke wrote​:

Many tests in S03-operators/increment.t are throwing ad hoc exceptions
instead of X​::Parameter​::RW

There have been some changes in this area​:

1) With roast commit Raku/roast@93736e7f73 the failing tests have been changed from expecting X​::Parameter​::RW to X​::Multi​::NoMatch.

2) After some recent changes to the multi method cache (Raku/nqp@567f6568f1) only one test in S03-operators/increment.t is failing due to not throwing X​::Multi​::NoMatch​:

$ ./perl6-j -Ilib -e 'use Test; throws-like q[my $x = 0; ++++$x], X​::Multi​::NoMatch'
  1..2
  ok 1 - 'my $x = 0; ++++$x' died
  not ok 2 - right exception type (X​::Multi​::NoMatch)
  # Failed test 'right exception type (X​::Multi​::NoMatch)'
  # at gen/jvm/CORE.setting line 16869
  # Expected​: X​::Multi​::NoMatch
  # Got​: X​::AdHoc
  # Exception message​: Cannot assign to a readonly variable or a value
  # Looks like you failed 1 test of 2
not ok 1 - did we throws-like X​::Multi​::NoMatch?
# Failed test 'did we throws-like X​::Multi​::NoMatch?'
# at -e line 1

3) There are three other tests in roast with the same failure mode (and fudged with this ticket number)​:

* https://github.com/perl6/roast/blob/2452b9dce146a98172f4b56cfec14d435fe4e2b1/S04-statements/for.t#L631
* https://github.com/perl6/roast/blob/2452b9dce146a98172f4b56cfec14d435fe4e2b1/S06-traits/misc.t#L21-L27
* https://github.com/perl6/roast/blob/aca8689bc407c5461d07a52631ebcaa1f67bebad/S06-traits/misc.t#L39-L42

I'll adjust the subject of this ticket accordingly and I'll update the fudge messages for the mentioned tests.

Also, there are two (failing) tests in S06-traits/misc.t that expect X​::Parameter​::RW but the test code does not die currently. Those tests are fudged with this ticket number as well, but I think the underlying problem is a bit different and those tests deserve a separate ticket​: https://github.com/perl6/roast/blob/aca8689bc407c5461d07a52631ebcaa1f67bebad/S06-traits/misc.t#L48-L54

@p6rt
Copy link
Author

p6rt commented Dec 30, 2017

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented May 26, 2018

From @usev6

After rakudo/rakudo@704b893c6a the last tests fudged with this ticket are passing. I'm closing this ticket as 'resolved'.

1 similar comment
@p6rt
Copy link
Author

p6rt commented May 26, 2018

From @usev6

After rakudo/rakudo@704b893c6a the last tests fudged with this ticket are passing. I'm closing this ticket as 'resolved'.

@p6rt p6rt closed this as completed May 26, 2018
@p6rt
Copy link
Author

p6rt commented May 26, 2018

@usev6 - Status changed from 'open' to 'resolved'

@p6rt p6rt added the JVM Related to Rakudo-JVM label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JVM Related to Rakudo-JVM
Projects
None yet
Development

No branches or pull requests

1 participant