1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
;; -*-theme-d-*-
;; Copyright (C) 2020 Tommi Höynälänmaa
;; Distributed under GNU General Public License version 3,
;; see file doc/GPL-3.
;; Expected results: translation error (type mismatch)
(define-proper-program (tests test787)
(import (standard-library core))
(declare <target-object> <class>)
(define-class <entity>
(fields
(tt-type (:union <target-object> <boolean>) public public)
(type-dispatched? <boolean> public public)
(exact-type? <boolean> public public)))
(define gl-ent (create <entity> 1 2))
(define-class <target-object>
(superclass <entity>)
(fields
(primitive? <boolean> public public)
(incomplete? <boolean> public public)
(al-field-values (:union (:alist <symbol> <object>) <boolean>)
public public)
(x-prim-contents <object> public public)
(x-opt-contents <object> public public)))
(define-main-proc (() <none> nonpure)
(console-display-line gl-ent)))
|