qupa-project / uniview-lang

View once immutability enabling the safeties of immutable code, while enjoying near procedural performance
https://uniview.qupa.org
MIT License
2 stars 0 forks source link

LLVM Crash: Structures defined out of order #30

Closed AjaniBilby closed 3 years ago

AjaniBilby commented 3 years ago

When structures are defined after the use of a GEP, it causes the LLVM compiler to crash

Example

import "print.uv";

fn main(): int {
    print("cat");
    let c = Blank#[Cat]();

    let name = c.name;
    print(name.placeholder);

    return 0;
}

struct Name {
    placeholder: i64;
}

struct Cat {
    name: Name;
    age: int;
}