summary refs log tree commit diff stats
path: root/tests/accept/compile
diff options
context:
space:
mode:
Diffstat (limited to 'tests/accept/compile')
-rw-r--r--tests/accept/compile/tcan_inherit_generic.nim10
-rw-r--r--tests/accept/compile/tcan_specialise_generic.nim11
-rw-r--r--tests/accept/compile/tspecialised_is_equivalent.nim15
3 files changed, 36 insertions, 0 deletions
diff --git a/tests/accept/compile/tcan_inherit_generic.nim b/tests/accept/compile/tcan_inherit_generic.nim
new file mode 100644
index 000000000..fa92c7986
--- /dev/null
+++ b/tests/accept/compile/tcan_inherit_generic.nim
@@ -0,0 +1,10 @@
+##
+## 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
+  TSpef[T] = object of TGen[T]
+
diff --git a/tests/accept/compile/tcan_specialise_generic.nim b/tests/accept/compile/tcan_specialise_generic.nim
new file mode 100644
index 000000000..f98a8bf95
--- /dev/null
+++ b/tests/accept/compile/tcan_specialise_generic.nim
@@ -0,0 +1,11 @@
+##
+## can_specialise_generic Nimrod Module
+##
+## Created by Eric Doughty-Papassideris on 2011-02-16.
+## Copyright (c) 2011 FWA. All rights reserved.
+
+type
+  TGen[T] = object
+  TSpef = object of TGen[string]
+  
+
diff --git a/tests/accept/compile/tspecialised_is_equivalent.nim b/tests/accept/compile/tspecialised_is_equivalent.nim
new file mode 100644
index 000000000..60b976e90
--- /dev/null
+++ b/tests/accept/compile/tspecialised_is_equivalent.nim
@@ -0,0 +1,15 @@
+##
+## specialised_is_equivalent Nimrod Module
+##
+## Created by Eric Doughty-Papassideris on 2011-02-16.
+## Copyright (c) 2011 FWA. All rights reserved.
+
+type
+  TGen[T] = tuple[a: T]
+  TSpef = tuple[a: string]
+
+var
+  a: TGen[string]
+  b: TSpef
+a = b
+