Fundament-Software / scopes

Fundament fork of the Scopes language
Other
3 stars 1 forks source link

References in Tuples is undefined #3

Open ErikMcClure opened 1 year ago

ErikMcClure commented 1 year ago

Using a reference in a tuple results in invalid LLVM generation, because this case is not handled by the compiler at all:

using import struct

type foo : i32

struct bar
    f : (& foo)

local f : foo = (bitcast 1 foo)
let b =
    bar
        f = f
_;

Work needs to be done to extend the type system to include reference types inside tuples and correctly compile them.