aboutsummaryrefslogtreecommitdiff
path: root/v_windows/v/old/vlib/v/tests/inout/enum_print.vv
diff options
context:
space:
mode:
Diffstat (limited to 'v_windows/v/old/vlib/v/tests/inout/enum_print.vv')
-rw-r--r--v_windows/v/old/vlib/v/tests/inout/enum_print.vv24
1 files changed, 24 insertions, 0 deletions
diff --git a/v_windows/v/old/vlib/v/tests/inout/enum_print.vv b/v_windows/v/old/vlib/v/tests/inout/enum_print.vv
new file mode 100644
index 0000000..473a645
--- /dev/null
+++ b/v_windows/v/old/vlib/v/tests/inout/enum_print.vv
@@ -0,0 +1,24 @@
+module main
+
+enum Color {
+ orange
+ green = 5
+ red = 2
+ yellow = 3
+}
+
+struct Aaa{
+ color Color
+}
+
+fn main() {
+ col := Color.green
+ a := Aaa{color: col}
+ orange := Color.orange
+ println(orange)
+ println(Color.yellow)
+ println(col)
+ println(a.color)
+ println('interp: ${col}')
+ println('interp: ${a.color}')
+}