;; -*-theme-d-*-

;; Copyright (C) 2017 Tommi Höynälänmaa
;; Distributed under GNU General Public License version 3,
;; see file doc/GPL-3.

;; Expected results: error


(define-proper-program (tests test546)


  (import (standard-library core)
	  (standard-library console-io)
	  (standard-library object-string-conversion))

  (define-param-proc my-proc1 (%type)
		     (((x %type)) <none> nonpure)
    (console-display-string (real->string x)))

  (define-param-proc my-proc2 (%type)
		     (((x %type)) <none> nonpure)
    (my-proc1 x)
    (my-proc1 x))

  (define-simple-proc my-proc3 (((proc (:procedure (<integer>) <none> nonpure))
				 (r <integer>))
				<none>
				nonpure)
    (proc r))

  (define main
    (lambda (() <none> nonpure)
      (my-proc3 my-proc2 10)
      (console-newline))))

