Akuli / jou

Yet another programming language
MIT License
11 stars 4 forks source link

compiler crash with cyclic-referencing classes #299

Open Akuli opened 1 year ago

Akuli commented 1 year ago
class Foo:
    bar: Bar

class Bar:
    foo: Foo

Expected result: a clear error message that explains what is wrong Actual result: compiler crashes

If one of the two members is a pointer (e.g. foo: Foo*), this works as expected. You must use a pointer somewhere, just like in C, but if you don't, there should be a clear error message.