blob: 4deffece827d51f8838791948fa487ad9b754147 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
discard """
targets: "cpp"
cmd: "nim cpp $file"
output: '''
'''
"""
{.emit: """/*TYPESECTION*/
struct Foo {
Foo(int a){};
};
struct Boo {
Boo(int a){};
};
""".}
type
Foo {.importcpp.} = object
Boo {.importcpp, noInit.} = object
Test {.exportc.} = object
foo {.noInit.}: Foo
boo: Boo
proc makeTest(): Test {.constructor: "Test() : foo(10), boo(1)".} =
discard
proc main() =
var t = makeTest()
main()
|