-
Notifications
You must be signed in to change notification settings - Fork 421
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
use statement does not find renamed import #19799
Comments
Here is a program doing a similar thing, but without an import that renames: module A {
use B;
use CC;
var x = cvar;
proc main() {
writeln(x);
}
}
module B {
module CC {
var cvar: int = 1;
}
public import this.CC;
} This one compiles and runs. But, the compiler here can just be using the |
I kinda suspect these are two separate issues. My expectation is that the renaming one is a result of the The fact that it doesn't work for modules made visible by a public use or import without renaming is concerning and surprising, and I wonder if it failed in that way last release or if this is a result of recent changes (either your PR or some of my bug fixes during issues week) |
All 3 examples in the OP fail with 1.26. (Also I don't think we necessarily need to fix this in the production compiler - we can just focus on getting it working in dyno). |
I'm definitely okay with that, especially since it seems like we're close to relying on that portion of the dyno compiler |
We should definitely file them as futures, though, so we don't forget that we want to fix them |
I was expecting the following program to compile and run, because the
use B
brings in something namedCC
which actually refers toC
; souse CC
should work. However it does not.There is a variation that fails in a similar way but does not use an
as
statement:This one also fails in a similar way with a
public use
instead:The text was updated successfully, but these errors were encountered: