acton icon indicating copy to clipboard operation
acton copied to clipboard

Missing checks for initialization of base class properties

Open ddjoh opened this issue 2 years ago • 0 comments

Acton Version

0.16.0.20230807.13.20.3

Steps to Reproduce

Compile and run

class Foo:
    @property
    x: str

    def __init__(self, x):
        self.x = x

    def __str__(self):
        return self.x

class Bar(Foo):
    def __init__(self):
        pass

actor main(env):
    b = Bar()
    print(b)
    await async env.exit(0)

Expected Behavior

Compiler error due to uninitialized properties inherited from class Foo.

Actual Behavior

ERROR: segmentation fault
NOTE: this is likely a bug in acton, please report this at:
NOTE: https://github.com/actonlang/acton/issues/new
NOTE: include the backtrace printed below between -- 8< -- lines

-- 8< --------- BACKTRACE --------------------
[New LWP 575478]
[New LWP 575479]
[New LWP 575480]
...

ddjoh avatar Aug 09 '23 10:08 ddjoh