From 08c2a1741d3d31ff7d382a7f61a978a8c9f955bd Mon Sep 17 00:00:00 2001 From: Ryan McConnell Date: Fri, 22 Nov 2024 00:52:48 -0500 Subject: [PATCH] fixes #24451; concept matching generic body (#24458) I think this might not be a comprehensive solution to dealing with `tyGenericBody` but we take a step forward #24451 --- compiler/concepts.nim | 23 +++++++++++++------ tests/concepts/tconceptsv2.nim | 41 ++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 7 deletions(-) create mode 100644 tests/concepts/tconceptsv2.nim diff --git a/compiler/concepts.nim b/compiler/concepts.nim index 800735d318..3f0d30538e 100644 --- a/compiler/concepts.nim +++ b/compiler/concepts.nim @@ -88,6 +88,13 @@ proc existingBinding(m: MatchCon; key: PType): PType = proc conceptMatchNode(c: PContext; n: PNode; m: var MatchCon): bool +proc matchType(c: PContext; f, a: PType; m: var MatchCon): bool + +proc matchKids(c: PContext; f, a: PType; m: var MatchCon, start=0): bool= + result = true + for i in start..