shithub: mc

ref: bdcd9c57965c02da5e30e71ff5eaeb0a71b26ca4
dir: /test/empty-struct.myr/

View raw version
use std

type foo = struct
;;

type bar = struct
        baz : foo[:]
        quux : foo[0][:]
;;


const main = {
        var a : foo
        var z : foo[0]
        var b : bar = [.baz = [a, a][:], .quux = [z, z, z][:]]
        var c : int = 0
        for f : b.baz
                c += 3
        ;;

        for f : b.quux
                c += 5
        ;;

        std.exit(c)
}