feat: add `self` keyword to import a module
Feature Request
Describe the Feature Request
Currently when testing my contracts, to test the assertions of events, I might need to import the contract and it's internal content, like:
use registry::Registry
use registry::Registry::{
DataRegistered, DataUpdated
};
Registry here is a contract module. I would like to be able to write:
use registry::Registry::{
self, DataRegistered, DataUpdated
};
hey assign this to me
duplicate: #3344
Can I tackle this one?
@g4titanx If you want to tackle this, please update.
In general this should be done by updating crates/cairo-lang-semantic/src/resolve/mod.rs to handle self as a leaf during the resolution of a path.
@g4titanx If you want to tackle this, please update.
In general this should be done by updating
crates/cairo-lang-semantic/src/resolve/mod.rsto handleselfas a leaf during the resolution of a path.
i made a PR already, please review
hey any updates?
I'm still not convinced this is so helpful. but attached PR.
bounded ints are more useful than this 😄