You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it seems to be the case that when part of a full class name is repeated,
that roles in subclasses are reported as undeclared during compilation.
This issue showed up recently in Test::Builder where the word 'Test' appears
twice in the full class name (Test::Builder::Test). See raku-community-modules/Test-Builder#5 for more
information. The issue first turned up in Rakudo commit
ab946945735042ff99953f6636bdf98acd5bfc71.
@ugexe managed to golf the problem to the following:
Works: perl6 -e 'class A::B::A { }; role A::B::C { }; class A::B { has A::B::C $!x; };'
Fails: perl6 -e '{ class A::B::A { }; }; role A::B::C { }; class A::B { has A::B::C $!x; };'
Works: perl6 -e '{ class A::B::X { }; }; role A::B::C { }; class A::B { has A::B::C $!x; };'
where 'Works' gives no output and 'Fails' reports the following error
message:
===SORRY!===
Type 'A::B::C' is not declared
------> le A::B::C { }; class A::B { has A::B::C⏏ $!foo; };
Malformed has
------> ole A::B::C { }; class A::B { has A::B::⏏C $!foo; };
Note that only when at least the third part of the full class name is
repeated that this issue occurs. If the second part is repeated, the issue
does not appear, e.g.,
perl6 -e '{ class A::A::X { }; }; role A::A::C { }; class A::A { has A::A::C $!x; };'
Migrated from rt.perl.org#130424 (status was 'new')
Searchable as RT130424$
The text was updated successfully, but these errors were encountered: