;; -*-theme-d-*-

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

;; Expected results: translation error


(define-proper-program (tests test371)

  (import (standard-library core))

  (define-class <a> <object> #t #f #f public ()
    ((i <integer> public module 0)))

  (define <b> <a>)

  (define-simple-method method1
    (((obj <a>)) <integer> pure)
    (field-ref obj 'i))

  (define-simple-method method1
    (((obj <b>)) <integer> pure)
    (field-ref obj 'i))

  (define-simple-proc main (() <integer> nonpure)
    (let ((obj (make <a>)))
      (method1 obj))))
