Skip to content

Commit

Permalink
added test-case from #896
Browse files Browse the repository at this point in the history
  • Loading branch information
bunny351 committed Aug 19, 2012
1 parent 9c04968 commit 0c8c318
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions distribution/manifest
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions tests/runtests.sh
Expand Up @@ -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 \
Expand Down
23 changes: 23 additions & 0 deletions 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))

0 comments on commit 0c8c318

Please sign in to comment.