summaryrefslogtreecommitdiff
path: root/bos-sugar.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bos-sugar.sh')
-rw-r--r--bos-sugar.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/bos-sugar.sh b/bos-sugar.sh
index a199ed9..2da789a 100644
--- a/bos-sugar.sh
+++ b/bos-sugar.sh
@@ -25,7 +25,7 @@ function bos-sugar/current-class-into() {
function bos-sugar/set-metaclass-for-current-class() {
local class; bos-sugar/current-class-into class
- local metaclass_ref; bos-namespaces/store-scalar-for-into meta "$class" metaclass_ref
+ local metaclass_ref; bos-namespaces/store-scalar-for-into metaclass_ref meta "$class"
local -n metaclass_object="$metaclass_ref"
metaclass_object='bos-dispatch/invoke bos/mop/inheritance 0'
}
@@ -42,7 +42,7 @@ function bos-sugar/class-open() {
function extends() {
local fq_class; bos-sugar/current-class-into fq_class
- local metaclass_ref; bos-namespaces/store-scalar-for-into meta "$fq_class" metaclass_ref
+ local metaclass_ref; bos-namespaces/store-scalar-for-into metaclass_ref meta "$fq_class"
local -n metaclass_object="$metaclass_ref"
$metaclass_object set-superclasses-for "$fq_class" "$@"
}
@@ -53,9 +53,9 @@ function bos-sugar/class-open() {
# this will get renamed into the class
function new-into() {
- local class _; bos-object/unpack-self-into "$self" class _
+ local class _; bos-object/unpack-self-into class _ "$self"
local -n new_into_result="$1"; shift
- local metaclass_ref; bos-namespaces/store-scalar-for-into meta "$class" metaclass_ref
+ local metaclass_ref; bos-namespaces/store-scalar-for-into metaclass_ref meta "$class"
local -n metaclass_object="$metaclass_ref"
local new_object
@@ -71,10 +71,10 @@ function bos-sugar/class-close() {
local class="$1"
local fq_class; bos-sugar/current-class-into fq_class
- local metaclass_ref; bos-namespaces/store-scalar-for-into meta "$fq_class" metaclass_ref
+ local metaclass_ref; bos-namespaces/store-scalar-for-into metaclass_ref meta "$fq_class"
local -n metaclass_object="$metaclass_ref"
- local -a methods_list; bos-namespaces/list-new-funcs-into "$fq_class" methods_list
+ local -a methods_list; bos-namespaces/list-new-funcs-into methods_list "$fq_class"
bos-namespaces/qualify-funcs "$fq_class" "${methods_list[@]}"
$metaclass_object make-mro-for "$fq_class"