rtulip / haystack

Haystack is a compiled, statically typed, stack-based language with opt-in variable assignment.
MIT License
25 stars 2 forks source link

Recursive types aren't reported properly #153

Closed rtulip closed 1 year ago

rtulip commented 1 year ago
struct Foo:
struct Foo {
    Foo: foo
}

This should be rejected for having infinite size.

rtulip commented 1 year ago

This is an example where it actually recurses:

struct Foo:
struct Foo {
    Opt<Foo>: bar
impl:
    fn bar(Foo: foo) { }

}