From d5e50c2f20c29f532e119d642e9a6f48e8decdfc Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 17 Dec 2024 09:06:53 +0200 Subject: [PATCH] ci: fix option_fn_voidptr_test.v after a200c45 --- vlib/v/tests/options/option_fn_voidptr_test.v | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vlib/v/tests/options/option_fn_voidptr_test.v b/vlib/v/tests/options/option_fn_voidptr_test.v index 7508a45c9cbb2a..34cb910329725e 100644 --- a/vlib/v/tests/options/option_fn_voidptr_test.v +++ b/vlib/v/tests/options/option_fn_voidptr_test.v @@ -1,9 +1,9 @@ struct Foo { mut: - func ?fn (voidptr) bool = unsafe { nil } + func ?fn (voidptr) ?bool = unsafe { nil } } -fn callback(foo &Foo) bool { +fn callback(foo &Foo) ?bool { return foo.func? == callback } @@ -13,11 +13,11 @@ fn test_main() { } assert t.func? == callback call_fn := t.func? - assert call_fn(&t) + assert call_fn(&t)? mut a := Foo{} a.func = callback assert a.func? == callback call_fn2 := a.func? - assert call_fn2(&a) + assert call_fn2(&a)? }