mirror of
https://github.com/circify/circ.git
synced 2026-01-12 23:28:14 -05:00
19 lines
349 B
Plaintext
19 lines
349 B
Plaintext
struct Bar<N> {
|
|
field[N] c
|
|
bool d
|
|
}
|
|
|
|
struct Foo<P> {
|
|
Bar<P> a
|
|
bool b
|
|
}
|
|
|
|
// const Bar<2> VAR_B = Bar{ c: [0, 0], d: false }
|
|
|
|
def main() -> (Foo<2>):
|
|
Bar<2> var_b = Bar{ c: [0, 0], d: false }
|
|
// Bar<2> var_b = VAR_B
|
|
Foo<2>[2] f = [Foo { a: var_b, b: true}, Foo { a: var_b, b: true}]
|
|
f[0].a.c = [42, 43]
|
|
return f[0]
|