summary refs log tree commit diff stats
path: root/tests/generics/tcan_inherit_generic.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/generics/tcan_inherit_generic.nim')
-rw-r--r--tests/generics/tcan_inherit_generic.nim17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/generics/tcan_inherit_generic.nim b/tests/generics/tcan_inherit_generic.nim
new file mode 100644
index 000000000..a6f4d946b
--- /dev/null
+++ b/tests/generics/tcan_inherit_generic.nim
@@ -0,0 +1,17 @@
+##
+## can_inherit_generic Nimrod Module
+##
+## Created by Eric Doughty-Papassideris on 2011-02-16.
+## Copyright (c) 2011 FWA. All rights reserved.
+
+type
+  TGen[T] = object of TObject
+    x, y: T
+  
+  TSpef[T] = object of TGen[T]
+
+
+var s: TSpef[float]
+s.x = 0.4
+s.y = 0.6
+