summaryrefslogtreecommitdiff
path: root/test.sh
diff options
context:
space:
mode:
authorGianni Ceccarelli <gianni.ceccarelli@broadbean.com>2023-07-20 14:51:27 +0100
committerGianni Ceccarelli <gianni.ceccarelli@broadbean.com>2023-07-20 14:52:02 +0100
commitf156b3c1ad1e7ec248364803331d2eb57e607295 (patch)
tree58c66d3db1e2adc5896b484adcf99d8630e59112 /test.sh
parentconstructors & class methods! (diff)
downloadbash-object-system-f156b3c1ad1e7ec248364803331d2eb57e607295.tar.gz
bash-object-system-f156b3c1ad1e7ec248364803331d2eb57e607295.tar.bz2
bash-object-system-f156b3c1ad1e7ec248364803331d2eb57e607295.zip
test next/method
Diffstat (limited to 'test.sh')
-rw-r--r--test.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/test.sh b/test.sh
index f161647..1a4371e 100644
--- a/test.sh
+++ b/test.sh
@@ -26,10 +26,23 @@ class B; do
done
+class C; do
+ extends B
+
+ function thing() {
+ echo "<$self> C/thing ($*)"
+
+ $self next/method "$@"
+ }
+
+done
+
A new-into objA
B new-into objB
+C new-into objC
$objA thing 1 2 3
$objB thing 4 5 6
-$objB other 7 8 9
+$objC thing 7 8 9
+$objB other a b c