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
Problem occurs when a class which has attributes similar to the return
value is used. And that class does not even need to be directly involved, just being
`use`d is enough. In the code mentioned above that class is class B.
In class A:
use B;
method make_str returns Array of Str {
Array[Str].new: '' xx 3;
}
In class B:
has Str @.arr;
It gives this error: 'Type check failed for return value; expected
Array[Str] but got Array[Str].new("", "", "")'
It works when I remove `use B;`, change Str in `has Str @.arr` to
something else or change @.arr to $.arr.
Migrated from rt.perl.org#127309 (status was 'new')
Searchable as RT127309$
The text was updated successfully, but these errors were encountered: