summary refs log tree commit diff stats
path: root/tests/ic/tgenericinst.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ic/tgenericinst.nim')
-rw-r--r--tests/ic/tgenericinst.nim11
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