trivial diff: add test case

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Mar 18 21:21:46 AEDT 1998


Estimated hours taken: 0.25

tests/invalid/Mmakefile:
tests/invalid/type_inf_loop.m:
tests/invalid/type_inf_loop.err_exp:
	Add a test case for an old bug: the case where
	type inference leads to an infinite loop.

cvs diff: Diffing .
Index: Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/Mmakefile,v
retrieving revision 1.14
diff -u -u -r1.14 Mmakefile
--- Mmakefile	1998/03/04 04:37:23	1.14
+++ Mmakefile	1998/03/18 10:19:28
@@ -38,6 +38,7 @@
 	prog_io_erroneous.m \
 	qual_basic_test2.m \
 	qualified_cons_id2.m \
+	type_inf_loop.m \
 	type_loop.m \
 	type_mismatch.m \
 	typeclass_test_1.m \
Index: type_inf_loop.err_exp
===================================================================
RCS file: type_inf_loop.err_exp
diff -N type_inf_loop.err_exp
--- /dev/null	Wed Mar 18 21:05:01 1998
+++ type_inf_loop.err_exp	Wed Mar 18 21:18:45 1998
@@ -0,0 +1,10 @@
+type_inf_loop.m:004: Error: clause for predicate `type_inf_loop:loop/1'
+type_inf_loop.m:004:   without preceding `pred' declaration.
+Type inference iteration limit exceeded.
+This probably indicates that your program has a type error.
+You should declare the types explicitly.
+(The current limit is 60 iterations.  You can use the
+`--type-inference-iteration-limit' option to increase the limit).
+type_inf_loop.m:004: Inferred :- pred loop((pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred (pred T1))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))).
+type_inf_loop.m:004: Error: no mode declaration for predicate `type_inf_loop:loop/1'.
+For more information, try recompiling with `-E'.
Index: type_inf_loop.m
===================================================================
RCS file: type_inf_loop.m
diff -N type_inf_loop.m
--- /dev/null	Wed Mar 18 21:05:01 1998
+++ type_inf_loop.m	Wed Mar 18 21:18:39 1998
@@ -0,0 +1,6 @@
+:- module type_inf_loop.
+:- interface.
+:- implementation.
+loop(loop).
+:- end_module type_inf_loop.
+
-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list