From e0975a53d43c0e463a2d9ca84ee5ea66fa94b2cd Mon Sep 17 00:00:00 2001 From: metagn Date: Thu, 29 Aug 2024 13:09:05 +0300 Subject: [PATCH] add test for #12720 anyway --- tests/generics/tuninstantiatedgenericcalls.nim | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/generics/tuninstantiatedgenericcalls.nim b/tests/generics/tuninstantiatedgenericcalls.nim index d7188a4ff5343..917ab4fd1a2d5 100644 --- a/tests/generics/tuninstantiatedgenericcalls.nim +++ b/tests/generics/tuninstantiatedgenericcalls.nim @@ -305,6 +305,18 @@ block: # issue #1969 type TripleLike[Generator] = tuple a, b, c: typeof(new(Generator)[].next) +import std/atomics + +block: # issue #12720 + const CacheLineSize = 128 + type + Enqueueable = concept x, type T + x is ptr + x.next is Atomic[pointer] + MyChannel[T: Enqueueable] = object + pad: array[CacheLineSize - sizeof(default(T)[]), byte] + dummy: typeof(default(T)[]) + when false: # issue #22342, type section version of #22607 type GenAlias[isInt: static bool] = ( when isInt: