feat: add stable executable knowledge symbols
This commit is contained in:
1 parent
92de46aca4
commit
0bbe735c3c
13 files changed
+841
-40
No files matched your search
@@ -5,4 +5,4 @@ import helpers:../structure/ns/helpers.mq.md
|
||||
|
||||
# main
|
||||
|
||||
> helpers.Box.tag s=x
|
||||
> helpers.Box.type_name
|
||||
@@ -490,6 +490,20 @@ fn bytecode_ns_use() {
|
||||
assert_out_backend("tests/structure/ns/use.mq.md", "bytecode", "hi");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn structure_ns_associated_function() {
|
||||
assert_out("tests/structure/ns/associated.mq.md", "associated\n701");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn bytecode_ns_associated_function() {
|
||||
assert_out_backend(
|
||||
"tests/structure/ns/associated.mq.md",
|
||||
"bytecode",
|
||||
"associated\n701",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn error_ns_instance_method() {
|
||||
assert_err(
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: receiver-free object children are associated executable knowledge
|
||||
import helpers:helpers.mq.md
|
||||
---
|
||||
|
||||
# main
|
||||
|
||||
**year = helpers.Box.tag(s="associated")**
|
||||
|
||||
> print text=`year`
|
||||
|
||||
**also = helpers.Box.birth_year**
|
||||
|
||||
> print text=`also`
|
||||
@@ -17,3 +17,11 @@ Nested free function (not an object method) for `helpers.pack.label`.
|
||||
+ `s`
|
||||
|
||||
*s*
|
||||
|
||||
## birth_year
|
||||
|
||||
*701*
|
||||
|
||||
## type_name
|
||||
|
||||
*`self`*
|
||||
Reference in new issue
Block a user