Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#896 closed defect (fixed)

-strict-types fails with forall types (sometimes)

Reported by: Moritz Heidkamp Owned by: felix winkelmann
Priority: minor Milestone: 4.9.0
Component: compiler Version: 4.8.x
Keywords: Cc:
Estimated difficulty:

Description

(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))

Tested with 4.8.0rc2

Change History (4)

comment:1 Changed 9 years ago by Moritz Heidkamp

Whoops, forgot to mention the actual error. It's

Error: [internal compiler error] resolve: can't resolve unknown type-variable: x20

        Call history:

        <syntax>          (##core#begin (define (foo x) (make-bar x)))
        <syntax>          (define (foo x) (make-bar x))
        <syntax>          (##core#set! foo (##core#lambda (x) (make-bar x)))
        <syntax>          (##core#lambda (x) (make-bar x))
        <syntax>          (##core#begin (make-bar x))
        <syntax>          (make-bar x)  <--

comment:2 Changed 9 years ago by felix winkelmann

Owner: set to felix winkelmann
Status: newassigned

comment:3 Changed 9 years ago by sjamaan

Resolution: fixed
Status: assignedclosed

Fixed by revision 9c04968eb45c0b14794326711620367af8a839f9

comment:4 Changed 8 years ago by felix winkelmann

Milestone: 4.8.04.9.0

Milestone 4.8.0 deleted

Note: See TracTickets for help on using tickets.