Added struct lifetime test
This commit is contained in:
parent
377b66663f
commit
f7a4f0cacc
3 changed files with 12 additions and 0 deletions
8
tests/programs/struct-lifetime.q
Normal file
8
tests/programs/struct-lifetime.q
Normal file
|
@ -0,0 +1,8 @@
|
|||
main() {
|
||||
c := new(Counter)
|
||||
c.value += 16
|
||||
}
|
||||
|
||||
struct Counter {
|
||||
value int
|
||||
}
|
|
@ -69,6 +69,7 @@ var programs = []struct {
|
|||
{"index-static", 0},
|
||||
{"index-dynamic", 0},
|
||||
{"struct", 0},
|
||||
{"struct-lifetime", 0},
|
||||
{"len", 0},
|
||||
{"cast", 0},
|
||||
{"function-pointer", 0},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue