From 3dfe242dbbed32e0c09142ab1874cc06cf1869ed Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 4 Aug 2020 16:13:04 +0300 Subject: [PATCH] vfmt: add a regression test for `type SocketMessageFn = fn (mut c Client, msg &Message) ? --- vlib/v/fmt/tests/fntype_mut_args_with_optional_keep.vv | 1 + vlib/v/fmt/tests/fntype_return_optional_input.vv | 3 --- ...urn_optional_expected.vv => fntype_return_optional_keep.vv} | 0 3 files changed, 1 insertion(+), 3 deletions(-) create mode 100644 vlib/v/fmt/tests/fntype_mut_args_with_optional_keep.vv delete mode 100644 vlib/v/fmt/tests/fntype_return_optional_input.vv rename vlib/v/fmt/tests/{fntype_return_optional_expected.vv => fntype_return_optional_keep.vv} (100%) diff --git a/vlib/v/fmt/tests/fntype_mut_args_with_optional_keep.vv b/vlib/v/fmt/tests/fntype_mut_args_with_optional_keep.vv new file mode 100644 index 0000000000..efb2685d03 --- /dev/null +++ b/vlib/v/fmt/tests/fntype_mut_args_with_optional_keep.vv @@ -0,0 +1 @@ +pub type SocketMessageFn = fn (mut c Client, msg &Message) ? diff --git a/vlib/v/fmt/tests/fntype_return_optional_input.vv b/vlib/v/fmt/tests/fntype_return_optional_input.vv deleted file mode 100644 index 58bac90ca5..0000000000 --- a/vlib/v/fmt/tests/fntype_return_optional_input.vv +++ /dev/null @@ -1,3 +0,0 @@ -type Foo = fn (a int)? - -type Foo2 = fn (num int)?int diff --git a/vlib/v/fmt/tests/fntype_return_optional_expected.vv b/vlib/v/fmt/tests/fntype_return_optional_keep.vv similarity index 100% rename from vlib/v/fmt/tests/fntype_return_optional_expected.vv rename to vlib/v/fmt/tests/fntype_return_optional_keep.vv