summary refs log tree commit diff stats
path: root/tests/generics/tinheritable_importcpp.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/generics/tinheritable_importcpp.nim')
-rw-r--r--tests/generics/tinheritable_importcpp.nim10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/generics/tinheritable_importcpp.nim b/tests/generics/tinheritable_importcpp.nim
new file mode 100644
index 000000000..8ee18b70b
--- /dev/null
+++ b/tests/generics/tinheritable_importcpp.nim
@@ -0,0 +1,10 @@
+discard """
+  targets: "cpp"
+  action: compile
+"""
+
+# #4651
+type
+  Vector[T] {.importcpp: "std::vector<'0 >", header: "vector", inheritable.} = object
+  VectorDerived {.importcpp: "SomeVectorDerived", nodecl.} = object of Vector[int]
+  # Error: inheritance only works with non-final objects