;; -*-theme-d-*-

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

;; Expected results: translation and running OK


(define-proper-program (tests test65)


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


  (define-class <my-class> <object> #t #f #f public ()
    ((field1 <integer> public public)))


  (declare my-decl-proc (:procedure (<my-class>) <integer> pure))


  (define-simple-proc my-proc (((obj <my-class>)) <none> nonpure)
    (console-display (my-decl-proc obj))
    (console-newline))


  (define-simple-proc my-decl-proc
    (((obj <my-class>)) <integer> pure)
    (field-ref obj 'field1))


  (define main
    (lambda (() <none> nonpure)
      (let ((obj (make <my-class> 10)))
	(console-display (my-decl-proc obj))
	(console-newline)
	(field-set! obj 'field1 20)
	(my-proc obj)))))
