mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 17:34:43 +00:00
* make more standard libraries work with `nimPreviewSlimSystem` * typo * part two * Delete specutils.nim * fixes more tests * more fixes * fixes tests * fixes three more tests * add formatfloat import * fix * last
17 lines
247 B
Nim
17 lines
247 B
Nim
import locks
|
|
import std/assertions
|
|
|
|
type MyType* [T] = object
|
|
lock: Lock
|
|
|
|
proc createMyType*[T]: MyType[T] =
|
|
initLock(result.lock)
|
|
|
|
proc use* (m: var MyType): int =
|
|
withLock m.lock:
|
|
result = 3
|
|
|
|
block:
|
|
var l: Lock
|
|
doAssert $l == "()"
|