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

error on typo #4446

Open
p6rt opened this issue Jul 29, 2015 · 7 comments
Open

error on typo #4446

p6rt opened this issue Jul 29, 2015 · 7 comments
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Jul 29, 2015

Migrated from rt.perl.org#125716 (status was 'open')

Searchable as RT125716$

@p6rt
Copy link
Author

p6rt commented Jul 29, 2015

From @lizmat

[11​:37​:50] <FROGGS> m​: role A { mutli method BUILD() { say "A" } }; class B does A { method BUILD { say "B" } }; B.new # lol
[11​:37​:50] <+camelia> rakudo-moar 646b90​: OUTPUT«===SORRY!===␤Cannot find method 'collisions'␤»
[11​:38​:19] <lizmat> mutli ?
[11​:38​:25] <FROGGS> tpyo

Expanding on this a bit more​:

$ 6l 'role A { mutli method BUILD() { say "A" } }; class B does A { } }'
Cannot find method 'collisions'
  at src/gen/m-Metamodel.nqp​:2634 (blib/Perl6/Metamodel.moarvm​:apply​:69)
from src/gen/m-Metamodel.nqp​:2812 (blib/Perl6/Metamodel.moarvm​:compose​:96)
from src/Perl6/World.nqp​:2435 (blib/Perl6/World.moarvm​:pkg_compose​:12)
from src/gen/m-Perl6-Actions.nqp​:2161 (blib/Perl6/Actions.moarvm​:package_def​:1209)

It looks like $to_compose_meta in src/Perl6/Metamodel/RoleToClassApplier.nqp, line 63 is not of a class that has a .collisions method (it *is* instantiated, but as WHAT I have not been able to determine).

Compare this with the error where we just have the role definition​:

$ 6l 'role A { mutli method BUILD() { say "A" } }'
Undeclared routine​:
  mutli used at line 1

  at src/gen/m-CORE.setting​:15420 (/Users/liz/Github/rakudo.moar/install/share/perl6/runtime/./CORE.setting.moarvm​:throw​:193)
from src/Perl6/Grammar.nqp​:4282 (blib/Perl6/Grammar.moarvm​:cry_sorrows​:129)
from src/Perl6/Grammar.nqp​:1094 (blib/Perl6/Grammar.moarvm​:comp_unit​:1101)
from src/Perl6/Grammar.nqp​:395 (blib/Perl6/Grammar.moarvm​:TOP​:491)

One would expect the above code to do the same.

Liz

@p6rt
Copy link
Author

p6rt commented Jul 29, 2015

From @FROGGS

m​: role A { mutli method BUILD() { say "A" } }; class B does A { method
BUILD { say "B" } }; B.new # lol
rakudo-moar 646b90​: OUTPUT«===SORRY!===␤Cannot find method 'collisions'␤»

m​: role A { mutli method BUILD() { say "A" } }; A.new
rakudo-moar 646b90​: OUTPUT«===SORRY!=== Error while compiling
/tmp/1eXnCAt3OX␤Undeclared routine​:␤ mutli used at line 1␤␤»

So it only happens when the role is consumed by a class.

@p6rt
Copy link
Author

p6rt commented Jul 29, 2015

From @lizmat

Please merge with #​125716 or vice-versa :-)

On 29 Jul 2015, at 12​:58, Tobias Leich (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by Tobias Leich
# Please include the string​: [perl #​125717]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=125717 >

m​: role A { mutli method BUILD() { say "A" } }; class B does A { method
BUILD { say "B" } }; B.new # lol
rakudo-moar 646b90​: OUTPUT«===SORRY!===␤Cannot find method 'collisions'␤»

m​: role A { mutli method BUILD() { say "A" } }; A.new
rakudo-moar 646b90​: OUTPUT«===SORRY!=== Error while compiling
/tmp/1eXnCAt3OX␤Undeclared routine​:␤ mutli used at line 1␤␤»

So it only happens when the role is consumed by a class.

@p6rt
Copy link
Author

p6rt commented Jul 29, 2015

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

@p6rt
Copy link
Author

p6rt commented Oct 2, 2017

From @AlexDaniel

I guess this is not better, but it's progress​:

===SORRY!=== Error while compiling -e
Could not instantiate role 'A'​:
Cannot invoke this object (REPR​: Null; VMNull)
at -e​:1

On 2015-07-29 04​:08​:02, elizabeth wrote​:

Please merge with #​125716 or vice-versa :-)

On 29 Jul 2015, at 12​:58, Tobias Leich (via RT) <perl6-bugs-
followup@​perl.org> wrote​:

# New Ticket Created by Tobias Leich
# Please include the string​: [perl #​125717]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=125717 >

m​: role A { mutli method BUILD() { say "A" } }; class B does A {
method
BUILD { say "B" } }; B.new # lol
rakudo-moar 646b90​: OUTPUT«===SORRY!===␤Cannot find method
'collisions'␤»

m​: role A { mutli method BUILD() { say "A" } }; A.new
rakudo-moar 646b90​: OUTPUT«===SORRY!=== Error while compiling
/tmp/1eXnCAt3OX␤Undeclared routine​:␤ mutli used at line 1␤␤»

So it only happens when the role is consumed by a class.

@p6rt
Copy link
Author

p6rt commented Oct 2, 2017

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

@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
@JJ
Copy link

JJ commented Dec 31, 2020

Still the same behavior with 2012.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

2 participants