aboutsummaryrefslogtreecommitdiff
path: root/v_windows/v/vlib/v/fmt/tests/import_selective_input.vv
diff options
context:
space:
mode:
Diffstat (limited to 'v_windows/v/vlib/v/fmt/tests/import_selective_input.vv')
-rw-r--r--v_windows/v/vlib/v/fmt/tests/import_selective_input.vv71
1 files changed, 71 insertions, 0 deletions
diff --git a/v_windows/v/vlib/v/fmt/tests/import_selective_input.vv b/v_windows/v/vlib/v/fmt/tests/import_selective_input.vv
new file mode 100644
index 0000000..534b72e
--- /dev/null
+++ b/v_windows/v/vlib/v/fmt/tests/import_selective_input.vv
@@ -0,0 +1,71 @@
+import math { max,
+ min,
+}
+
+import cli { Command }
+import math.complex { complex, Complex }
+import os {
+ input, user_os, file_ext }
+
+import mod {
+ Unused,
+ StructEmbed, StructField, StructRefField
+ StructMethodArg,
+ StructMethodRet
+
+ InterfaceField,
+ InterfaceMethodArg,
+ InterfaceMethodRet,
+
+ FnArg,
+ FnRet,
+
+ RightOfIs,
+ RightOfAs,
+
+ Enum
+}
+
+struct Struct {
+ StructEmbed
+ v StructField
+ ref &StructRefField
+}
+
+fn (s Struct) method(v StructMethodArg) StructMethodRet {
+ return StructMethodRet{}
+}
+
+interface Interface {
+ v InterfaceField
+ f(InterfaceMethodArg) InterfaceMethodRet
+}
+
+fn f(v FnArg) FnRet {
+ if v is RightOfIs {}
+ _ = v as RightOfAs
+
+ println(Enum.val)
+
+ return FnRet{}
+}
+
+struct App {
+ command &Command
+}
+
+struct MyCommand {
+ Command
+}
+
+fn imaginary(im f64) Complex {
+ return complex(0, im)
+}
+
+fn main() {
+ println(max(0.1, 0.2))
+ println(min(0.1, 0.2))
+ println(user_os())
+ println(file_ext('main.v'))
+ println(imaginary(1))
+}