@@ 719,6 719,16 @@ sc_type_set_symbol Arguments '__typecall
add i 1
box-pointer (sc_arguments_type pcount types)
+# calling arguments
+sc_type_set_symbol Arguments '__call
+ box-spice-macro
+ fn "Arguments" (args)
+ let argcount = (sc_argcount args)
+ verify-count argcount 1 -1
+ let head = (sc_getarg args 0)
+ let args = (sc_getarglist args 1)
+ sc_valueref_tag (sc_value_anchor args) `(head args)
+
# shorter type constructor
let _: = Arguments
@@ 7517,13 7527,13 @@ sugar include (args...)
'set-symbols pointer
__@ =
inline (self index)
- ptrtoref (getelementptr self index)
+ ptrtoref (getelementptr (view self) index)
__toref =
inline (self)
ptrtoref self
__getattr =
inline (self key)
- getattr (ptrtoref self) key
+ getattr (ptrtoref (view self)) key
__== =
simple-binary-op
inline (a b)