mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
The compiler is now smart enough to emit types only if needed without all the importc tricks. This also fixes a codegen bug where, if all the stars align correctly, typeinfo doesn't include any definition of `TNimType` but uses it. Found by @skilchen in #8938
9 lines
95 B
Nim
9 lines
95 B
Nim
discard """
|
|
targets: "c cpp"
|
|
"""
|
|
|
|
import typeinfo
|
|
|
|
var x = ""
|
|
discard (getPointer(toAny(x)))
|