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

set op(s?) do(es?)n't preserve class inheritance #5190

Closed
grondilu opened this issue Feb 6, 2023 · 2 comments
Closed

set op(s?) do(es?)n't preserve class inheritance #5190

grondilu opened this issue Feb 6, 2023 · 2 comments
Assignees

Comments

@grondilu
Copy link
Contributor

grondilu commented Feb 6, 2023

The Problem

set union operator (+) does not preserve inheritance from Bag.

Steps to Reproduce

use Test;
plan 1;

class Foo is Bag {}
isa-ok Foo.new("a") (+) Foo.new("b"), Foo, "union of two Foo instances should be a Foo instance";

Environment

  • Operating system: fedora 37
  • Compiler version: Rakudo™ v2022.12-1118-g03b3b13db
@lizmat
Copy link
Contributor

lizmat commented Feb 6, 2023

I think the problem is broader, and probably applies to all set operators.

@lizmat lizmat self-assigned this Feb 6, 2023
@grondilu grondilu changed the title set op doesn't preserve class inheritance set op(s?) do(es?)n't preserve class inheritance Feb 6, 2023
lizmat added a commit that referenced this issue Feb 6, 2023
@lizmat
Copy link
Contributor

lizmat commented Feb 6, 2023

Added test with Raku/roast@a647a0ecae I think all set ops are covered now. So closing. Please re-open if I missed something :-)

@lizmat lizmat closed this as completed Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants