feat: macros (multi-rep, hygiene), Drop field-move, lean multi-OS CI
ci / build (ubuntu) (push) Has been cancelled
ci / unit + fmt (push) Has been cancelled
ci / examples (push) Has been cancelled
ci / goldens + tools (push) Has been cancelled
ci / apps (push) Has been cancelled
ci / selfhost smoke (push) Has been cancelled
ci / macos smoke (push) Has been cancelled
ci / windows smoke (push) Has been cancelled
ci / CI gate (push) Has been cancelled
selfhost-loop / bootstrap determinism (push) Has been cancelled

Sessions 56–69: declarative macro! with rep/zip/literal/block and
unhygienic var $name binders; partial field-move skip Drop; @[Release]
polish; LSP type hierarchy; CI Nim cache + lean macOS + Windows smoke.
This commit is contained in:
2026-07-20 17:19:46 +03:00
parent 6f2a3b1d88
commit fe3b1e8b6a
41 changed files with 5281 additions and 141 deletions
+44 -1
View File
@@ -370,4 +370,47 @@ func Main() -> int {
return 0;
}
""")
check(not res.hasErrors)
check(not res.hasErrors)
test "@[Release] alone disables checks (zero-cost path)":
let res = checkSource("""
@[Release]
func Dangle() -> &int {
var x: int = 1;
return &x;
}
func Main() -> int {
return 0;
}
""")
check(not res.hasErrors)
test "@[Checked] @[Release] — Release wins, no use-after-move error":
let res = checkSource("""
@[Checked]
@[Release]
func Consume(s: own String) {
// move then use — allowed because Release disables checker
let t: own String = s;
let u: own String = s;
}
func Main() -> int {
return 0;
}
""")
check(not res.hasErrors)
test "@[Checked] still errors without Release":
let res = checkSource("""
@[Checked]
func Bad() -> &int {
var x: int = 1;
return &x;
}
func Main() -> int {
return 0;
}
""")
check(res.hasErrors)
check(res.diagnostics[0].message.contains("local") or
res.diagnostics[0].message.contains("reference"))