mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-02 03:02:31 +00:00
refs https://github.com/nim-lang/Nim/pull/24315#discussion_r1816332587
(cherry picked from commit 40fc2d0e76)
9 lines
185 B
Nim
9 lines
185 B
Nim
type Foo* = object
|
|
x*, y*: int
|
|
|
|
proc `$`*(x: static Foo): string =
|
|
"static Foo(" & $x.x & ", " & $x.y & ")"
|
|
|
|
proc `$`*(x: Foo): string =
|
|
"runtime Foo(" & $x.x & ", " & $x.y & ")"
|