Skip to content

Commit f3f76cd

Browse files
ringaboutnarimiran
authored andcommitted
closes #23394; adds a test case (#25416)
closes #23394 (cherry picked from commit 89c8f0a)
1 parent e6413f8 commit f3f76cd

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/arc/tgenerics.nim

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
discard """
2+
matrix: "--mm:refc"
3+
"""
4+
type
5+
State = enum
6+
Uninit
7+
Init
8+
Uart[T: static State] = object
9+
baudRate: int
10+
port: int
11+
12+
proc `=destroy`(uart: var Uart[Init]) = raiseAssert "Destroyed"
13+
14+
# proc `=copy`(a: var Uart[Init], b: Uart[Init]) {.error.} # Error: signature for '=copy' must be proc[T: object](x: var T; y: T)
15+
16+
proc main() =
17+
var a = Uart[Uninit]()
18+
19+
main()

0 commit comments

Comments
 (0)