summaryrefslogtreecommitdiffstats
path: root/tests/012
diff options
context:
space:
mode:
Diffstat (limited to 'tests/012')
-rw-r--r--tests/012/oop-mi.expected6
-rw-r--r--tests/012/oop-mi.tl24
2 files changed, 26 insertions, 4 deletions
diff --git a/tests/012/oop-mi.expected b/tests/012/oop-mi.expected
index 91bc05df..301c7460 100644
--- a/tests/012/oop-mi.expected
+++ b/tests/012/oop-mi.expected
@@ -6,3 +6,9 @@ gs0
gs1-b1
(meth base3 b3m0)
(meth der1 b3m1)
+m1
+m2
+gm
+m1
+m2
+gm
diff --git a/tests/012/oop-mi.tl b/tests/012/oop-mi.tl
index 162c0243..7561d096 100644
--- a/tests/012/oop-mi.tl
+++ b/tests/012/oop-mi.tl
@@ -4,17 +4,21 @@
(gx 'gx)
(gy 'gy)
(:static gs0 'gs0)
- (:static gs1 'gs1))
+ (:static gs1 'gs1)
+ (:method gm (me) 'gm))
-(defstruct base0 nil)
+(defstruct base0 nil
+ (:method m (me) 'm0))
(defstruct base1 grand
(x 'b1x)
- (:static gs1 'gs1-b1))
+ (:static gs1 'gs1-b1)
+ (:method m (me) 'm1))
(defstruct base2 grand
(y 'b2y)
- (:static gs1 'gs1-b2))
+ (:static gs1 'gs1-b2)
+ (:method m (me) 'm2))
(defstruct base3 nil
(x 'b3x)
@@ -45,3 +49,15 @@
(prinl (func-get-name d0.b3m0))
(prinl (func-get-name d1.b3m1))
+
+(defstruct der2 (base3 base1 base2))
+(defstruct der3 (base3 base2 base1))
+
+(prinl (call-super-method (new der2) 'm))
+(prinl (call-super-method (new der3) 'm))
+(prinl (call-super-method (new der3) 'gm))
+(prinl (call-super-fun 'der2 'm nil))
+(prinl (call-super-fun 'der3 'm nil))
+(prinl (call-super-fun 'der3 'gm nil))
+
+