diff --git a/flake.nix b/flake.nix index 4febca24..7bd28c70 100644 --- a/flake.nix +++ b/flake.nix @@ -161,7 +161,9 @@ clippy pre-commit rustfmt + rust-analyzer ]; + RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; }; devShells.x86_64-linux.msys2 = pkgs.mkShell { name = "nac3-dev-shell-msys2"; diff --git a/nac3standalone/demo/src/inheritance.py b/nac3standalone/demo/src/inheritance.py index d280e3a5..9a9740a4 100644 --- a/nac3standalone/demo/src/inheritance.py +++ b/nac3standalone/demo/src/inheritance.py @@ -23,10 +23,33 @@ class B(A): self.a = b + 1 self.b = b +class C: + a: int32 + def __init__(self): + self.a = 42 + + def test2(self): + self.a = 23 +class D(C): + def __init__(self): + C.test2(self) + # self.test() + # C.test2(self) + # self.a = 2 + # __main__.C.__init__(self) + + def test(self): + self.a = 2 + + def run() -> int32: - aaa = A(5) - bbb = B(2) - aaa.f1() - bbb.f1() + x = D() + x.__init__() + output_int32(x.a) + + # aaa = A(5) + # bbb = B(2) + # aaa.f1() + # bbb.f1() return 0 diff --git a/pyo3_output/nac3artiq.so b/pyo3_output/nac3artiq.so new file mode 100755 index 00000000..beb4f236 Binary files /dev/null and b/pyo3_output/nac3artiq.so differ