keid-lang / keid

Central repository for the Keid programming language
0 stars 1 forks source link

Implement recursive struct/enum checker #59

Open lucasbaizer2 opened 1 year ago

lucasbaizer2 commented 1 year ago

There must be a mechanism in place preventing nested declarations of structs that would cause an infinite recursion when attempting to size the struct. This issue does not occur with class types since they are reference types and therefore a fixed width pointer. With that being said, recursive references to class objects of the same instance at runtime can cause a memory leak unless weak references are used.