mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 14:23:45 +00:00
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 & ")"
|