mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-22 15:25:22 +00:00
committed by
Andreas Rumpf
parent
432a4d1787
commit
1ec5c6fdf5
@@ -350,5 +350,19 @@ testinstance:
|
||||
|
||||
main()
|
||||
|
||||
{.emit: """/*TYPESECTION*/
|
||||
typedef struct{
|
||||
float a; float b;
|
||||
} Foo;
|
||||
""".}
|
||||
|
||||
type
|
||||
Foo {.importc.} = object
|
||||
|
||||
Bar = object
|
||||
b: byte
|
||||
foo: Foo
|
||||
|
||||
assert sizeof(Bar) == 12
|
||||
|
||||
echo "OK"
|
||||
|
||||
Reference in New Issue
Block a user