martian-lang/martian-rust

Martian structs may be generated out of order if nested

Closed this issue · 1 comments

I encountered a case where I created two martian-rust structs A and B where A contained a B. The resulting martian structs were generated out of order, where A was declared before B in the .mro and wouldn't typecheck because B wasn't declared yet. Switching the order of the structs in the generated .mro solved the problem easily. I tried switching the order of the structs in the rust code, but that didn't seem to change the order of the generated martian structs

fix in #26