From 80c8f06663658e12fcdcd2d36a0ee38683de552a Mon Sep 17 00:00:00 2001 From: Clyybber Date: Mon, 4 Jan 2021 18:41:02 +0100 Subject: [PATCH] Add test for static proc/lambda params (#16584) --- tests/statictypes/tstatictypes.nim | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/statictypes/tstatictypes.nim b/tests/statictypes/tstatictypes.nim index 8817e07a05..41c0601380 100644 --- a/tests/statictypes/tstatictypes.nim +++ b/tests/statictypes/tstatictypes.nim @@ -366,3 +366,19 @@ block: block: type Foo[N: static int] = array[int32(0) .. int32(N), float] type T = Foo[3] + + +#------------------------------------------------------------------------------------------ +# static proc/lambda param +func isSorted2[T](a: openArray[T], cmp: static proc(x, y: T): bool {.inline.}): bool = + result = true + for i in 0..