mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 03:32:32 +00:00
adds some test cases (#24436)
closes #24043
closes #24045
(cherry picked from commit cc696f18c0)
This commit is contained in:
@@ -69,3 +69,25 @@ proc main() =
|
||||
doAssert ctx.rootsOfUnity2[0].limbs.len == wordsRequired(255)
|
||||
|
||||
main()
|
||||
|
||||
block: # bug #24045
|
||||
type ArrayBuf[N: static int, T] = object
|
||||
buf: array[N, T]
|
||||
|
||||
func maxLen(T: type): int =
|
||||
sizeof(T) * 2
|
||||
|
||||
type MyBuf[I: type] = ArrayBuf[maxLen(I), byte]
|
||||
|
||||
var v: MyBuf[int]
|
||||
|
||||
block: # bug #24043
|
||||
type ArrayBuf[N: static int, T = byte] = object
|
||||
buf: array[N, T]
|
||||
|
||||
func maxLen(T: type): int =
|
||||
sizeof(T) * 2
|
||||
|
||||
type MyBuf[I] = ArrayBuf[maxLen(I)]
|
||||
|
||||
var v: MyBuf[int]
|
||||
|
||||
Reference in New Issue
Block a user