summary refs log tree commit diff stats
path: root/tests/accept/compile
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-03-25 00:47:03 +0100
committerAraq <rumpf_a@web.de>2011-03-25 00:47:03 +0100
commit032599c156260a0892522b6ce858b1cdff08df84 (patch)
tree582c86f5e7a23595e1253af47133be3c4764da1f /tests/accept/compile
parent220dd54acfd5527c7c569811013b178fc462898e (diff)
downloadNim-032599c156260a0892522b6ce858b1cdff08df84.tar.gz
bugfix: type converter that converts to bool in 'if' context
Diffstat (limited to 'tests/accept/compile')
-rw-r--r--tests/accept/compile/tcan_alias_generic.nim11
-rw-r--r--tests/accept/compile/tcan_alias_specialised_generic.nim11
-rw-r--r--tests/accept/compile/ttypeconverter1.nim6
3 files changed, 26 insertions, 2 deletions
diff --git a/tests/accept/compile/tcan_alias_generic.nim b/tests/accept/compile/tcan_alias_generic.nim
new file mode 100644
index 000000000..e90bdc6d2
--- /dev/null
+++ b/tests/accept/compile/tcan_alias_generic.nim
@@ -0,0 +1,11 @@
+##
+## can_alias_generic Nimrod Module
+##
+## Created by Eric Doughty-Papassideris on 2011-02-16.
+## Copyright (c) 2011 FWA. All rights reserved.
+
+type
+  TGen[T] = object
+  TGen2[T] = TGen[T]
+  
+
diff --git a/tests/accept/compile/tcan_alias_specialised_generic.nim b/tests/accept/compile/tcan_alias_specialised_generic.nim
new file mode 100644
index 000000000..9e93e7266
--- /dev/null
+++ b/tests/accept/compile/tcan_alias_specialised_generic.nim
@@ -0,0 +1,11 @@
+##
+## can_alias_specialised_generic Nimrod Module
+##
+## Created by Eric Doughty-Papassideris on 2011-02-16.
+## Copyright (c) 2011 FWA. All rights reserved.
+
+type
+  TGen[T] = object
+  TSpef = TGen[string]
+  
+
diff --git a/tests/accept/compile/ttypeconverter1.nim b/tests/accept/compile/ttypeconverter1.nim
index 9553f6568..b9a5e88ae 100644
--- a/tests/accept/compile/ttypeconverter1.nim
+++ b/tests/accept/compile/ttypeconverter1.nim
@@ -1,6 +1,8 @@
 
 converter p(i: int): bool = return i != 0
 
-if 0:
-  echo "foo"
+if 1:
+  echo if 4: "foo" else: "barr"
+while 0: 
+  echo "bar"