-
-
Notifications
You must be signed in to change notification settings - Fork 624
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
Invalid type lookup #1091
Comments
IIRC when I had this problem I used the full type and it was working well. in your example is struct X {
struct A {}
struct B {}
let a: X.A // variable.type?.globalName == "A"
let b: X.B // variable.type?.globalName == "X.B"
} |
👋 Hey @artyom-stv , thank you very much for reporting and providing files, I was able to easily reproduce the issue. Smallest data set to reproduce the issue is this: struct X {
struct A {}
let a: A
}
struct A {} I'm investigating and will keep you updated 👍 |
Investigation goes on, in the meanwhile:
Then, it is parsed into
Here, there's a possibility to check if the embedding struct has the same inner type as variable's type (or any other component type, maybe better to make this logic generic 🤷 ). Continuing ... |
@art-divin the issue here is more of a resolver / combine phase issue rather than parsing, we build up tree correctly so we know there is |
Thanks @krzysztofzablocki , indeed, parsing is done correctly, the missing logic was in Creating MR, fixed 👍 |
I suspect that |
Addressed the reported issue in #1179 |
Hi!
I ran into a problem in my
.swifttemplate
template. It seems that thetype
of aVariable
is resolved incorrectly if there is a nested and global type with the same name.In the following example, the
type
of aVariable
a
is resolved to the global typeA
instead of the expected nested typeX.A
.Example (zip)
The text was updated successfully, but these errors were encountered: