Skip Menu |
Report information
Id: 132073
Status: resolved
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: david.warring <david.warring [at] gmail.com>
Cc:
AdminCc:

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Date: Wed, 13 Sep 2017 08:55:36 +1200
Subject: [BUG] isa method errors when called on a subset type object
From: David Warring <david.warring [...] gmail.com>
To: rakudobug [...] perl.org
Download (untitled) / with headers
text/plain 493b
current behavior of isa method on a subset:

% perl6 -v
This is Rakudo version 2017.08-110-g5f3350656 built on MoarVM version 2017.08.1-156-g4
9b90b99
implementing Perl 6.c.
% perl6 -e'subset S of Int; say S.isa(Int)'
Cannot resolve caller isa(Perl6::Metamodel::SubsetHOW: S, Int); none of these signatur
es match:
   (Mu \SELF: Mu $type, *%_)
   (Mu \SELF: Str:D $name, *%_)
 in block <unit> at -e line 1

The documentation https://docs.perl6.org/routine/isa implies this should return True.

What about this commit? https://github.com/rakudo/rakudo/commit/0704cd97226e63001943426666c88cef1c5fe711

On 2017-09-12 13:55:51, david.warring wrote:
Show quoted text
> current behavior of isa method on a subset:
>
> % perl6 -v
> This is Rakudo version 2017.08-110-g5f3350656 built on MoarVM version
> 2017.08.1-156-g4
> 9b90b99
> implementing Perl 6.c.
> % perl6 -e'subset S of Int; say S.isa(Int)'
> Cannot resolve caller isa(Perl6::Metamodel::SubsetHOW: S, Int); none of
> these signatur
> es match:
> (Mu \SELF: Mu $type, *%_)
> (Mu \SELF: Str:D $name, *%_)
> in block <unit> at -e line 1
>
> The documentation https://docs.perl6.org/routine/isa implies this should
> return True.


From: David Warring <david.warring [...] gmail.com>
Subject: Re: [perl #132073] [BUG] isa method errors when called on a subset type object
Date: Sun, 17 Sep 2017 06:34:41 +1200
To: perl6-bugs-followup [...] perl.org
After that commit: subset S of Int; S.isa(True) returns true as expected.

I've noticed a quibble with subset of a subset:

perl6 -e'subset S of Int; subset S2 of S; say S2.isa(S)'
False

Should be True.

On Sun, Sep 17, 2017 at 3:17 AM, Aleks-Daniel Jakimenko-Aleksejev via RT <perl6-bugs-followup@perl.org> wrote:
Show quoted text
What about this commit?
https://github.com/rakudo/rakudo/commit/0704cd97226e63001943426666c88cef1c5fe711

On 2017-09-12 13:55:51, david.warring wrote:
> current behavior of isa method on a subset:
>
> % perl6 -v
> This is Rakudo version 2017.08-110-g5f3350656 built on MoarVM version
> 2017.08.1-156-g4
> 9b90b99
> implementing Perl 6.c.
> % perl6 -e'subset S of Int; say S.isa(Int)'
> Cannot resolve caller isa(Perl6::Metamodel::SubsetHOW: S, Int); none of
> these signatur
> es match:
> (Mu \SELF: Mu $type, *%_)
> (Mu \SELF: Str:D $name, *%_)
> in block <unit> at -e line 1
>
> The documentation https://docs.perl6.org/routine/isa implies this should
> return True.


From: David Warring <david.warring [...] gmail.com>
Subject: Re: [perl #132073] [BUG] isa method errors when called on a subset type object
Date: Sun, 17 Sep 2017 07:12:13 +1200
To: perl6-bugs-followup [...] perl.org
Download (untitled) / with headers
text/plain 1.3k
Tests added with roast commit https://github.com/perl6/roast/commit/d776a06e52c35d6cbb7b7bbade7b7a15b97ecff8

One remaining todo test for the subset of a subset case, ie:

subset S of Int; subset S2 of S; say S2.isa(S) 

On Sun, Sep 17, 2017 at 6:34 AM, David Warring <david.warring@gmail.com> wrote:
Show quoted text
After that commit: subset S of Int; S.isa(True) returns true as expected.

I've noticed a quibble with subset of a subset:

perl6 -e'subset S of Int; subset S2 of S; say S2.isa(S)'
False

Should be True.

On Sun, Sep 17, 2017 at 3:17 AM, Aleks-Daniel Jakimenko-Aleksejev via RT <perl6-bugs-followup@perl.org> wrote:
What about this commit?
https://github.com/rakudo/rakudo/commit/0704cd97226e63001943426666c88cef1c5fe711

On 2017-09-12 13:55:51, david.warring wrote:
> current behavior of isa method on a subset:
>
> % perl6 -v
> This is Rakudo version 2017.08-110-g5f3350656 built on MoarVM version
> 2017.08.1-156-g4
> 9b90b99
> implementing Perl 6.c.
> % perl6 -e'subset S of Int; say S.isa(Int)'
> Cannot resolve caller isa(Perl6::Metamodel::SubsetHOW: S, Int); none of
> these signatur
> es match:
> (Mu \SELF: Mu $type, *%_)
> (Mu \SELF: Str:D $name, *%_)
> in block <unit> at -e line 1
>
> The documentation https://docs.perl6.org/routine/isa implies this should
> return True.



Download (untitled) / with headers
text/plain 1.6k
Final issues resolved with https://github.com/rakudo/rakudo/commit/cee1be22cff6153506e31df2916f8a0be27b5fc8 On Sat, 16 Sep 2017 12:12:35 -0700, david.warring wrote: Show quoted text
> Tests added with roast commit > https://github.com/perl6/roast/commit/d776a06e52c35d6cbb7b7bbade7b7a15b97ecff8 > > One remaining todo test for the subset of a subset case, ie: > > subset S of Int; subset S2 of S; say S2.isa(S) > > On Sun, Sep 17, 2017 at 6:34 AM, David Warring > <david.warring@gmail.com> > wrote: >
> > After that commit: subset S of Int; S.isa(True) returns true as > > expected. > > > > I've noticed a quibble with subset of a subset: > > > > perl6 -e'subset S of Int; subset S2 of S; say S2.isa(S)' > > False > > > > Should be True. > > > > On Sun, Sep 17, 2017 at 3:17 AM, Aleks-Daniel Jakimenko-Aleksejev via > > RT < > > perl6-bugs-followup@perl.org> wrote: > >
> >> What about this commit? > >> https://github.com/rakudo/rakudo/commit/0704cd97226e63001943 > >> 426666c88cef1c5fe711 > >> > >> On 2017-09-12 13:55:51, david.warring wrote:
> >> > current behavior of isa method on a subset: > >> > > >> > % perl6 -v > >> > This is Rakudo version 2017.08-110-g5f3350656 built on MoarVM > >> > version > >> > 2017.08.1-156-g4 > >> > 9b90b99 > >> > implementing Perl 6.c. > >> > % perl6 -e'subset S of Int; say S.isa(Int)' > >> > Cannot resolve caller isa(Perl6::Metamodel::SubsetHOW: S, Int); > >> > none of > >> > these signatur > >> > es match: > >> > (Mu \SELF: Mu $type, *%_) > >> > (Mu \SELF: Str:D $name, *%_) > >> > in block <unit> at -e line 1 > >> > > >> > The documentation https://docs.perl6.org/routine/isa implies this
> >> should
> >> > return True.
> >> > >>
> >


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org