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

Predeclaring roles seems to be broken #1185

Closed
p6rt opened this issue Jul 31, 2009 · 5 comments
Closed

Predeclaring roles seems to be broken #1185

p6rt opened this issue Jul 31, 2009 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Jul 31, 2009

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

Searchable as RT68066$

@p6rt
Copy link
Author

p6rt commented Jul 31, 2009

From wayland@wayland.id.au

Rakudo version​: latest on ins2 branch
Parrot version​: parrot-1.4.0-6.fc10.i386

Test script​:


#!/usr/bin/perl6

role A {...}

role A {
  has $.variable;
}

A.new();


Output​:


$ perl6 foo/p6bug1.pl
Ambiguous dispatch to multi '_block20'. Ambiguous candidates had signatures​:
:()
:()
in Main (foo/p6bug1.pl​:9)


Expected output​: none

  This is important because sometimes it's necessary to do things like​:

role B { ... };

role A {
  has B $b;
}

role B {
  has A $a;
}

  ...and if the first one is missing, then the declaration of role A
complains it can't find B or something.

  :)


| Name​: Tim Nelson | Because the Creator is, |
| E-mail​: wayland@​wayland.id.au | I am |


----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+++ s+​: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V-
PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-
-----END GEEK CODE BLOCK-----

@p6rt
Copy link
Author

p6rt commented Mar 24, 2010

From @jnthn

On Thu Jul 30 19​:16​:11 2009, wayland wrote​:

Rakudo version​: latest on ins2 branch
Parrot version​: parrot-1.4.0-6.fc10.i386

Test script​:

------------------------------------------------------------

#!/usr/bin/perl6

role A {...}

role A {
has $.variable;
}

A.new();

------------------------------------------------------------

Output​:

------------------------------------------------------------

$ perl6 foo/p6bug1.pl
Ambiguous dispatch to multi '_block20'. Ambiguous candidates had
signatures​:
:()
:()
in Main (foo/p6bug1.pl​:9)

------------------------------------------------------------

Expected output​: none

Works now; assigning to moritz++ for tests.

Jonathan

@p6rt
Copy link
Author

p6rt commented Mar 24, 2010

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

@p6rt
Copy link
Author

p6rt commented Mar 24, 2010

From @moritz

now tested in S12-class/stubs.t

@p6rt
Copy link
Author

p6rt commented Mar 24, 2010

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

@p6rt p6rt closed this as completed Mar 24, 2010
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

1 participant