Fix private variables to be completely inaccessible

This commit is contained in:
Shunsuke Shibayama 2022-08-23 08:38:39 +09:00
parent 1532496a32
commit 8dcc44b9cb

View file

@ -233,9 +233,9 @@ fn escape_name(ident: Identifier) -> Str {
name = name.replace('!', "__erg_proc");
name = name.replace('$', "__erg_shared");
if vis.is_public() || is_python_global(&name) {
Str::rc(&name)
Str::from(name)
} else {
Str::from("__".to_string() + &name)
Str::from("::".to_string() + &name)
}
}