From 839657a730bd3c82d1b7932f996dd87448eb7d38 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Sat, 2 May 2015 10:02:54 -0600 Subject: Imported Upstream version 1.4.2 --- src/runtime/syscall_windows_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/runtime/syscall_windows_test.go') diff --git a/src/runtime/syscall_windows_test.go b/src/runtime/syscall_windows_test.go index ce8a9ec1b..126bef62e 100644 --- a/src/runtime/syscall_windows_test.go +++ b/src/runtime/syscall_windows_test.go @@ -533,3 +533,11 @@ func main() { println(z) } ` + +func TestCallbackWithNoInputParameters(t *testing.T) { + // Test that NewCallback and NewCallbackCDecl can accept functions without + // input parameters, see issue 9871. + cb := func() uintptr { return 0 } + _ = syscall.NewCallback(cb) + _ = syscall.NewCallbackCDecl(cb) +} -- cgit v1.2.3