typeinfo minor improvement (#16083)

* typeinfo minor improvement

* minor

* Update lib/core/typeinfo.nim

* rename typeinfo
This commit is contained in:
flywind 2020-11-24 05:56:30 +08:00 • committed by GitHub
commit e4d0f9f3de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 112 additions and 111 deletions

View file

@ -1,22 +0,0 @@
discard """
targets: "cpp"
output: '''100'''
"""
import typeinfo
#bug #6016
type
Onion {.union.} = object
field1: int
field2: uint64
Stroom = Onion
PStroom = ptr Stroom
proc pstruct(u: PStroom) =
echo u.field2
var x = Onion(field1: 100)
pstruct(x.addr)