Merge branch 'devel' into pr_mui

This commit is contained in:
ringabout
2026-04-09 20:53:59 +08:00
committed by GitHub
6 changed files with 94 additions and 23 deletions

View File

@@ -130,3 +130,14 @@ block: # issue #22646
var x: Vec[3, float]
let y = Color(x)
doAssert Vec3[float](y) == x
block: # bug #25697
type MyList = distinct seq[int]
iterator items(x: MyList): lent int {.borrow.}
let s = MyList(@[1, 2, 3])
var count = 0
for item in s:
count += 1
doAssert count == 3, "Expected 3 items, got " & $count

22
tests/objects/t25627.nim Normal file
View File

@@ -0,0 +1,22 @@
# issue #25627
import std/tables
type
FsoKind = enum
fsoFile
fsoDir
fsoLink
FakeFso = ref object
kind: FsoKind
dirName: string
files: OrderedTable[string, FakeFso]
DirStruct = object
root = FakeFso(kind: fsoDir, dirName: "/")
let dir = DirStruct()
doAssert dir.root.kind == fsoDir
doAssert dir.root.dirName == "/"
doAssert dir.root.files.len == 0