mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-31 18:32:11 +00:00
(cherry picked from commit 2f89f1eb78)
This commit is contained in:
@@ -153,3 +153,16 @@ proc unzip*[T,U](xs: List[tuple[t: T, u: U]]): (List[T], List[U]) = discard
|
||||
|
||||
proc unzip2*[T,U](xs: List[(T,U)]): (List[T], List[U]) = discard
|
||||
|
||||
type
|
||||
AtomicType = pointer|ptr|int
|
||||
|
||||
Atomic[T: AtomicType] = distinct T
|
||||
|
||||
Block[T: AtomicType] = object
|
||||
|
||||
AtomicContainer[T: AtomicType] = object
|
||||
b: Atomic[ptr Block[T]]
|
||||
|
||||
# bug #8295
|
||||
var x = AtomicContainer[int]()
|
||||
doAssert (ptr Block[int])(x.b) == nil
|
||||
|
||||
Reference in New Issue
Block a user