mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-01 05:11:09 +00:00
Fix a python module resolving bug
This commit is contained in:
parent
3c17518963
commit
954c6f752d
4 changed files with 41 additions and 36 deletions
|
@ -65,8 +65,13 @@ pub fn module(path: TyParam) -> Type {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
pub fn py_module(path: TyParam) -> Type {
|
||||
poly("PyModule", vec![path])
|
||||
pub fn py_module(path: TyParam, py_comp_mode: bool) -> Type {
|
||||
let name = if py_comp_mode {
|
||||
"ModuleType"
|
||||
} else {
|
||||
"PyModule"
|
||||
};
|
||||
poly(name, vec![path])
|
||||
}
|
||||
|
||||
pub fn module_from_path<P: Into<PathBuf>>(path: P) -> Type {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue