
;; Copyright (C) 2018 Tommi Höynälänmaa

;; Expected results: translation error
;;   (type mismatch in a static cast)

(define-proper-program (tests test617)

  (import (standard-library core)
	  (standard-library console-io))

  (define-param-class :c (%type) <object> #t #f #f public ()
    ((x %type public public)))

  (define-param-class :d (%type) (:c %type) #t #f #f public ()
    ((s <symbol> public public)))

  (define-param-proc myproc (%type)
		     (((c (:c %type))) <none> nonpure)
    (console-display-line (static-cast (:d %type) c)))

  (define-simple-proc main (() <none> nonpure)
    (let ((c (make (:c <integer>) 2)))
      (myproc c))))

