~ chicken-core (chicken-5) 0c8c318c89810ef1337a4169c3cc714f67fa0b51


commit 0c8c318c89810ef1337a4169c3cc714f67fa0b51
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Sun Aug 19 02:05:52 2012 +0200
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Sun Aug 19 02:05:52 2012 +0200

    added test-case from #896

diff --git a/distribution/manifest b/distribution/manifest
index 905aa2e3..4be115b0 100644
--- a/distribution/manifest
+++ b/distribution/manifest
@@ -143,6 +143,7 @@ tests/test-finalizers.scm
 tests/test-finalizers-2.scm
 tests/module-tests-compiled.scm
 tests/scrutiny-tests.scm
+tests/scrutiny-tests-strict.scm
 tests/typematch-tests.scm
 tests/scrutiny-tests-2.scm
 tests/scrutiny-tests-3.scm
diff --git a/tests/runtests.sh b/tests/runtests.sh
index 4208c651..469ccd41 100755
--- a/tests/runtests.sh
+++ b/tests/runtests.sh
@@ -99,6 +99,9 @@ diff -bu scrutiny-2.expected scrutiny-2.out
 $compile scrutiny-tests-3.scm -specialize -block -ignore-repository -types $TYPESDB
 ./a.out
 
+$compile scrutiny-tests-strict.scm -strict-types -specialize -ignore-repository -types $TYPESDB
+./a.out
+
 echo "======================================== specialization tests ..."
 rm -f foo.types foo.import.*
 $compile specialization-test-1.scm -emit-type-file foo.types -specialize \
diff --git a/tests/scrutiny-tests-strict.scm b/tests/scrutiny-tests-strict.scm
new file mode 100644
index 00000000..57825a3a
--- /dev/null
+++ b/tests/scrutiny-tests-strict.scm
@@ -0,0 +1,23 @@
+;;;; scrutinizer-tests in "strict-types" mode
+
+
+;;; #896: internal error due to missing resolution of type-variables
+;;;       in "initial-argument-types" (scrutinizer.scm)
+;;;       (reported by Moritz)
+
+(define-record bar foo)
+
+(define-type bar
+  (struct bar))
+
+;; This breaks with csc -strict-types
+(: foo (forall (x string) (x -> bar)))
+
+;; Using this declaration instead of the above makes it work
+;; (: foo (string -> bar))
+
+;; Alternatively, removing this declaration makes it work, too
+(: make-bar (string -> bar))
+
+(define (foo x) (make-bar x))
+
Trap