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
export trait must operate with declared package name #142
Comments
My point of view is that the principle of least surprise dictate that the export name must be the same as user specifies it in the declaration. I.e. the example code should be equivalent to:
Proposed solutionThere is no clean way to get these names from the information available for the trait. It could of course guess the enclosing package name and subtract it from full symbol names, but that a bit cumbersome way. I propose to take what |
For `class A::B is export { }` the export trait would use `B::C` part even if the class is declared inside another named package. Solves Raku/problem-solving#142
Proposed solution is provided by rakudo/rakudo#3388. UPD I thought that long names are imported correctly. Unfortunately, I was wrong. More work would be required to merge symbols properly. Still, it doesn't change the point that the issue has to be taken care of. |
The PR is ready to merge. If there're no objections for the slightly adjusted |
A simple demonstration of the problem is the following code:
then:
The problem is caused by
export
trait using^shortname
as export name of a symbol.The text was updated successfully, but these errors were encountered: