diff options
Diffstat (limited to 'tests/ic/tgenericinst.nim')
-rw-r--r-- | tests/ic/tgenericinst.nim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ic/tgenericinst.nim b/tests/ic/tgenericinst.nim new file mode 100644 index 000000000..3346764f5 --- /dev/null +++ b/tests/ic/tgenericinst.nim @@ -0,0 +1,11 @@ +discard """ + cmd: "nim cpp --incremental:on $file" +""" + +{.emit:"""/*TYPESECTION*/ +#include <iostream> + struct Foo { }; +""".} + +type Foo {.importcpp.} = object +echo $Foo() #Notice the generic is instantiate in the this module if not, it wouldnt find Foo \ No newline at end of file |