Files
marqdo/tests/structure/inherit-explicit-super.mq.md
T
cflmyandCursor ecc92f473a Unify frontmatter imports as import bind:target and drop > imports.
`import json:lib/json.mq.md` binds file libraries; `import fmt:time.format`
binds member short names (replaces `> use`). Legacy `> path.mq.md` / `> use`
now hard-error with a hint. Migrates repo docs, skills, ext, lib, public, examples,
man-test and tests; adds a negative gold and updates view/catalog rendering.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-13 10:03:21 +08:00

29 lines
564 B
Markdown

---
title: inherit explicit parent constructor
import json:lib/json.mq.md
---
# Parent
+ `name`
*`out` = > json.parse text={"role":"parent"} *
*`out` = > json.set map=`out` key=name value=`name` *
**`out`**
# Child = > Parent
+ `name`
*`self` = > Parent name=`name` *
*`self` = > json.set map=`self` key=role value=child *
**`self`**
# main
*`c` = > Child name=Ada *
*`ty` = > json.get value=`c` key=_type *
*`role` = > json.get value=`c` key=role *
*`name` = > json.get value=`c` key=name *
> print text=`ty`
> print text=`role`
> print text=`name`