From f00e458f60d9c3c8b8b59eb2ef6998c2bbb6b99b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Bourdeauducq?= Date: Wed, 19 Jun 2024 18:16:54 +0800 Subject: [PATCH] add test for class without __init__ --- nac3standalone/demo/src/classes.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nac3standalone/demo/src/classes.py b/nac3standalone/demo/src/classes.py index f3688b7c..b00fa776 100644 --- a/nac3standalone/demo/src/classes.py +++ b/nac3standalone/demo/src/classes.py @@ -6,6 +6,10 @@ def output_int32(x: int32): def output_int64(x: int64): ... +@extern +def output_str(x: str): + ... + class B: b: int32 @@ -27,6 +31,10 @@ class A: # return self.b +class Initless: + def foo(self): + output_str("hello") + def run() -> int32: a = A(10) output_int32(a.a) @@ -35,4 +43,8 @@ def run() -> int32: output_int32(a.a) output_int32(a.get_a()) # output_int32(a.get_b().b) FIXME: NAC3 prints garbage + + initless = Initless() + initless.foo() + return 0