Logo
Explore Help
Register Sign In
tomoaki/hakorune
1
0
Fork 0
You've already forked hakorune
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
cedecb830116fd2fc178a628a597df7a1cbb3ed8
hakorune/apps/tests/phase285w_weak_call_rejected.hako

17 lines
382 B
Plaintext
Raw Normal View History

feat(phase285w): Phase 285W-Syntax-0.1 - Reject weak(...) syntax (Parser-level Fail-Fast) - Parser guard: Reject weak(...) with LPAREN check in parse_unary() - Error: "Use 'weak expr', not 'weak(expr)'" (helpful message) - Location: src/parser/expressions.rs:248-256 - MIR builder guard: Defense-in-depth for any bypassed cases - Location: src/mir/builder/calls/build.rs:37-46 - Rejection test: apps/tests/phase285w_weak_call_rejected.hako - Smoke test: phase285w_weak_call_rejected_vm.sh (PASS ✅) - Documentation: - EBNF.md: Add ~ (BitNot) to unary operators - lifecycle.md: Document weak(expr) as invalid syntax - phase-285/README.md: Add Phase 285W-Syntax-0.1 entry Test results: 5/6 phase285 tests PASS (1 unrelated failure) SSOT: docs/reference/language/lifecycle.md Closes: Phase 285W-Syntax-0.1
2025-12-25 00:04:55 +09:00
// Phase 285W-Syntax-0.1: Verify weak(x) function call syntax is rejected
// Expected: Parse error with helpful message
// SSOT: docs/reference/language/lifecycle.md (weak <expr> only)
box SomeBox {
x
}
static box Main {
main() {
local obj = new SomeBox()
obj.x = 42
local w = weak(obj) // ❌ ERROR: Should be "weak obj"
return 0
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.2 Page: 32ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API