summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/types/tisopr.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/types/tisopr.nim b/tests/types/tisopr.nim
index 533cf05be..67f1ce0c1 100644
--- a/tests/types/tisopr.nim
+++ b/tests/types/tisopr.nim
@@ -121,3 +121,17 @@ block:
     doAssert($s.a & "  " & $s.b == "x1  x3")
 
   enumGen(x1..x3)
+
+block:
+  # issue #11142
+  type
+    MyObjParam[N: static int] = object
+      x: int
+
+    MyObj[P: static MyObjParam] = object
+      y: int
+
+  const P = MyObjParam[256](x: 2)
+  let Q = MyObj[P](y: 2)
+  doAssert($Q  == "(y: 2)")
+