forked from alex-eg/sex
test an opaque record across a module boundary
A bodyless pub record ahead of a private definition exports the handle and keeps the fields, the way flecs keeps ecs_world_t. It worked with nothing added, and nothing said so.
This commit is contained in:
@@ -52,7 +52,10 @@
|
||||
(test-assert "struct keeps C's meaning"
|
||||
(not (emits? "(struct raw ((x int)))" "typedef")))
|
||||
(test-assert "a record needs a name"
|
||||
(reports? "(record ((x int)))" "record needs a name")))
|
||||
(reports? "(record ((x int)))" "record needs a name"))
|
||||
;; An opaque handle: the declaration is public, the fields are not
|
||||
(test-assert "declared, then defined, is still defined"
|
||||
(emits? "(pub record h)(record h ((x int)))" "struct h {")))
|
||||
|
||||
;; An ops block is mangled functions plus a registry entry. `pub'
|
||||
;; inside it means what it means outside.
|
||||
|
||||
Reference in New Issue
Block a user