diff options
author | Indrajith K L | 2022-12-03 17:00:20 +0530 |
---|---|---|
committer | Indrajith K L | 2022-12-03 17:00:20 +0530 |
commit | f5c4671bfbad96bf346bd7e9a21fc4317b4959df (patch) | |
tree | 2764fc62da58f2ba8da7ed341643fc359873142f /v_windows/v/vlib/v/fmt/tests/struct_keep.vv | |
download | cli-tools-windows-f5c4671bfbad96bf346bd7e9a21fc4317b4959df.tar.gz cli-tools-windows-f5c4671bfbad96bf346bd7e9a21fc4317b4959df.tar.bz2 cli-tools-windows-f5c4671bfbad96bf346bd7e9a21fc4317b4959df.zip |
Diffstat (limited to 'v_windows/v/vlib/v/fmt/tests/struct_keep.vv')
-rw-r--r-- | v_windows/v/vlib/v/fmt/tests/struct_keep.vv | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/v_windows/v/vlib/v/fmt/tests/struct_keep.vv b/v_windows/v/vlib/v/fmt/tests/struct_keep.vv new file mode 100644 index 0000000..68ed58b --- /dev/null +++ b/v_windows/v/vlib/v/fmt/tests/struct_keep.vv @@ -0,0 +1,46 @@ +import os + +struct KeepAnyLanguagePrefixVariation { + x C.bar + y &C.bar + z []C.bar + z2 []&C.bar +} + +fn foo(a []os.File) { +} + +struct User { + age int + name string +} + +fn handle_users(users []User) { + println(users.len) +} + +fn (u &User) foo(u2 &User) { +} + +type Expr = IfExpr | IntegerLiteral + +fn exprs(e []Expr) { + println(e.len) +} + +struct KeepStructEmbed { + User +pub: + a int + b int +} + +struct KeepMultiLineDefaultExprsIndent { + buttons []PeriodButton = [PeriodButton{ + period: pr.Period.m1 + text: 'M1' + }, PeriodButton{ + period: pr.Period.m5 + text: 'M5' + }] +} |