Fix: resolution structs and import aliases to support separated namespaces#287
Merged
KyrylR merged 1 commit intoBlockstreamResearch:dev/importsfrom Apr 20, 2026
Merged
Conversation
6a899a5 to
763086b
Compare
Collaborator
|
Was this thing allowed in simplicity 0.4.1? |
Collaborator
I was able to compile this: fn foo() -> bool { false }
type foo = bool;
fn main() {
let x: foo = false;
assert!(foo());
} |
KyrylR
reviewed
Apr 19, 2026
| /// This serves as the exact inverse of the `lookup` map. | ||
| paths: Vec<CanonPath>, | ||
|
|
||
| // NOTE: Consider to optimising this with `Vec` instead of `HashMap` |
Collaborator
There was a problem hiding this comment.
Suggested change
| // NOTE: Consider to optimising this with `Vec` instead of `HashMap` | |
| // TODO: Consider to optimising this with `Vec` instead of `HashMap` |
Collaborator
|
At the same time the following test passes: |
Collaborator
|
ACK 763086b So I would mention the behavior above in the md doc |
Collaborator
Author
Yes, SimplicityHL 0.4.1 allows this |
Collaborator
Author
It is okay too. I added this test and explain why it passed |
KyrylR
reviewed
Apr 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, SimplicityHL allows separated namespaces. A user should be able to use the exact same name for both a type and a function in the same scope. For example:
The previous alias tracking functionality broke this behavior during the use import resolution phase.
So, This PR refactors the alias architecture and the
process_use_itemlogic.