summaryrefslogtreecommitdiffstats
path: root/tests/012/oop-mi.tl
blob: 162c02437a6405b088727e237d6d5e55b261edc4 (plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
(load "../common")

(defstruct grand nil
  (gx 'gx)
  (gy 'gy)
  (:static gs0 'gs0)
  (:static gs1 'gs1))

(defstruct base0 nil)

(defstruct base1 grand
  (x 'b1x)
  (:static gs1 'gs1-b1))

(defstruct base2 grand
  (y 'b2y)
  (:static gs1 'gs1-b2))

(defstruct base3 nil
  (x 'b3x)
  (gx 'b3gx)
  (:method b3m0 (me))
  (:method b3m1 (me)))

(defstruct der0 (base0 base1 base2 base3)
  (x 'dx)
  (y 'dy)
  (z 'dz)
  (gy 'dgy)
  (:static gs0 'dgs0))

(defstruct der1 (base3 base1 base2)
  (:method b3m1 (me)))

(defvarl d0 (new der0))
(defvarl d1 (new der1))

(prinl d0)
(prinl d0.gs0)
(prinl d0.gs1)

(prinl d1)
(prinl d1.gs0)
(prinl d1.gs1)

(prinl (func-get-name d0.b3m0))
(prinl (func-get-name d1.b3m1))