diff --git a/vlib/v/tests/interface_var_test.v b/vlib/v/tests/interface_var_test.v new file mode 100644 index 00000000000000..196d5ecdbe7e19 --- /dev/null +++ b/vlib/v/tests/interface_var_test.v @@ -0,0 +1,28 @@ +interface Param {} + +fn test_main() { + param := Param(false) + + match param { + bool { + println(param) // &false + println(param == true) // false + println(param == false) // true + if param { + assert false + } + if !param { + assert true + } + if param == true { + assert false + } + if param == false { + assert true + } + } + else { + return + } + } +}