Skip Menu |
Report information
Id: 125996
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: dakkar <dakkar [at] thenautilus.net>
Cc:
AdminCc:

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



Subject: Complex parametric role composition fails badly when no candidate found
To: rakudobug [...] perl.org
From: Gianni Ceccarelli <dakkar [...] thenautilus.net>
Date: Sat, 5 Sep 2015 11:38:12 +0100
Download (untitled) / with headers
text/plain 770b
This code:: role R[$a,$b] {} role R2[$x] does R[1] {} class C does R2[1] {} C.new; Produces the error message:: ===SORRY!=== Cannot find method 'collisions' The error happens in ``RoleToClassApplier::apply``: something goes wrong with the nested role specialisation, and the compiler tries to apply a ``NQPMu``. -- Dakkar - <Mobilis in mobile> GPG public key fingerprint = A071 E618 DD2C 5901 9574 6FE2 40EA 9883 7519 3F88 key id = 0x75193F88 Giving up on assembly language was the apple in our Garden of Eden: Languages whose use squanders machine cycles are sinful. The LISP machine now permits LISP programmers to abandon bra and fig-leaf. -- Epigrams in Programming, ACM SIGPLAN Sept. 1982
From: Elizabeth Mattijsen <liz [...] dijkmat.nl>
To: perl6-compiler [...] perl.org
Subject: Re: [perl #125996] Complex parametric role composition fails badly when no candidate found
Date: Sat, 5 Sep 2015 12:44:18 +0200
Download (untitled) / with headers
text/plain 1.4k
One would expect an error message such as: $ 6 'role R[$a,$b] {}; class C does R[1] {}' ===SORRY!=== No appropriate parametric role variant available for ‘R' but even that message is rather LTA, as it doesn’t mention which parameters were tried and which candidates are available. Liz ==================== Show quoted text
> On 05 Sep 2015, at 12:38, dakkar (via RT) <perl6-bugs-followup@perl.org> wrote: > > # New Ticket Created by dakkar > # Please include the string: [perl #125996] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/Ticket/Display.html?id=125996 > > > > This code:: > > role R[$a,$b] {} > role R2[$x] does R[1] {} > class C does R2[1] {} > > C.new; > > Produces the error message:: > > ===SORRY!=== > Cannot find method 'collisions' > > The error happens in ``RoleToClassApplier::apply``: something goes > wrong with the nested role specialisation, and the compiler tries to > apply a ``NQPMu``. > > -- > Dakkar - <Mobilis in mobile> > GPG public key fingerprint = A071 E618 DD2C 5901 9574 > 6FE2 40EA 9883 7519 3F88 > key id = 0x75193F88 > > Giving up on assembly language was the apple in our Garden of Eden: > Languages whose use squanders machine cycles are sinful. The LISP > machine now permits LISP programmers to abandon bra and fig-leaf. > -- Epigrams in Programming, ACM SIGPLAN Sept. 1982
Last message still reproducible (2017.11,HEAD(e5b660e))

On 2015-09-05 03:44:49, elizabeth wrote:
Show quoted text
> One would expect an error message such as:
>
> $ 6 'role R[$a,$b] {}; class C does R[1] {}'
> ===SORRY!===
> No appropriate parametric role variant available for ‘R'
>
> but even that message is rather LTA, as it doesn’t mention which
> parameters were tried and which candidates are available.
>
>
>
> Liz
> ====================
> > On 05 Sep 2015, at 12:38, dakkar (via RT) <perl6-bugs-
> > followup@perl.org> wrote:
> >
> > # New Ticket Created by dakkar
> > # Please include the string: [perl #125996]
> > # in the subject line of all future correspondence about this issue.
> > # <URL: https://rt.perl.org/Ticket/Display.html?id=125996 >
> >
> >
> > This code::
> >
> > role R[$a,$b] {}
> > role R2[$x] does R[1] {}
> > class C does R2[1] {}
> >
> > C.new;
> >
> > Produces the error message::
> >
> > ===SORRY!===
> > Cannot find method 'collisions'
> >
> > The error happens in ``RoleToClassApplier::apply``: something goes
> > wrong with the nested role specialisation, and the compiler tries to
> > apply a ``NQPMu``.
> >
> > --
> > Dakkar - <Mobilis in mobile>
> > GPG public key fingerprint = A071 E618 DD2C 5901 9574
> > 6FE2 40EA 9883 7519 3F88
> > key id = 0x75193F88
> >
> > Giving up on assembly language was the apple in our Garden of Eden:
> > Languages whose use squanders machine cycles are sinful. The LISP
> > machine now permits LISP programmers to abandon bra and fig-leaf.
> > -- Epigrams in Programming, ACM SIGPLAN Sept. 1982




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