diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-03-25 20:34:24 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-03-25 20:34:24 +0200 |
| commit | eaf2d360120a4cab12c27ed51961cd5d224042ff (patch) | |
| tree | 888b4715a1edf7ec74fed1bd26c31213c548650d /tests/vars.cu | |
| parent | 3bd9103ce0b18f6900ba544a8b2786145868524f (diff) | |
| download | ek-eaf2d360120a4cab12c27ed51961cd5d224042ff.tar.gz ek-eaf2d360120a4cab12c27ed51961cd5d224042ff.zip | |
initial constant struct stuff
Diffstat (limited to 'tests/vars.cu')
| -rw-r--r-- | tests/vars.cu | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/vars.cu b/tests/vars.cu new file mode 100644 index 0000000..8780e3f --- /dev/null +++ b/tests/vars.cu @@ -0,0 +1,33 @@ +typedef any {} + +struct some_struct { + a i64; +} + +struct some_template (A any) { + a A; +} + +main() +{ + a mut i64 = 20; + a = 200; + + b mut some_struct = {20}; + b = {200}; + + c mut = {20} as some_struct; + c = {200}; + + d mut some_template = {20}; + d = {200}; + + e mut some_template (i64) = {20}; + e = {200}; + + f mut = {20} as some_template; + f = {200}; + + g mut = {20} as some_template(i64); + g = {200}; +} |
