Skip to content

Commit bdd3beb

Browse files
authored
Initialize ast when calling compile function (RustPython#4462)
1 parent 3b4b134 commit bdd3beb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

vm/src/vm/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ impl VirtualMachine {
247247
let mut essential_init = || -> PyResult {
248248
#[cfg(not(target_arch = "wasm32"))]
249249
import::import_builtin(self, "_signal")?;
250+
#[cfg(any(feature = "parser", feature = "compiler"))]
251+
import::import_builtin(self, "_ast")?;
250252
#[cfg(not(feature = "threading"))]
251253
import::import_frozen(self, "_thread")?;
252254
let importlib = import::init_importlib_base(self)?;

0 commit comments

Comments
 (0)