aboutsummaryrefslogtreecommitdiff
path: root/v_windows/v/vlib/v/checker/tests/no_interface_str.vv
diff options
context:
space:
mode:
Diffstat (limited to 'v_windows/v/vlib/v/checker/tests/no_interface_str.vv')
-rw-r--r--v_windows/v/vlib/v/checker/tests/no_interface_str.vv19
1 files changed, 19 insertions, 0 deletions
diff --git a/v_windows/v/vlib/v/checker/tests/no_interface_str.vv b/v_windows/v/vlib/v/checker/tests/no_interface_str.vv
new file mode 100644
index 0000000..b0da84a
--- /dev/null
+++ b/v_windows/v/vlib/v/checker/tests/no_interface_str.vv
@@ -0,0 +1,19 @@
+interface Animal {
+ speak()
+}
+
+struct Cow {
+}
+
+fn (c Cow)speak() {
+ println('moo')
+}
+
+fn get_animal() Animal {
+ return Cow{}
+}
+
+fn moin() {
+ a := get_animal()
+ println(a.str())
+}