Commit Graph
8 Commits
Author SHA1 Message Date
coolguy 23079ba9fb spec: mark the try enforcement entry resolved by M7 2026-08-17 00:03:26 +09:00
coolguyandClaude Opus 5 0a434d8a9a spec: record why the try rule cannot be enforced yet
SPEC.md allows `try` only inside a function returning an error union, but
check.c only tests it in the FE_N_EXPR_STMT case, so `var x = try e;` and
`x = try e;` walk straight past. m5/owned.fe and m5/runtime.fe both depend on
that gap.

Moving the check onto the try expression is a four-line change and it is
correct, but it cannot land yet. runtime.fe's `run` allocates and returns a
value, so closing the hole forces it to return an error union -- and master
rejects `return <value>;` in `-> !i32` ("return type mismatch") as well as a
bare `return;` in `-> !void` ("void expression returned from value function").
Both need contextual success construction, which is M7 work. `catch` and
`@trap()`, the two spellings SPEC offers as alternatives, are also M7-only, so
there is no way to express `run` legally on master today. All three paths were
tried in DOSBox-X, not assumed.

Fix owned.fe now, since `main() -> !void` is legal today and matches
m4/try-fpr.fe, and leave the checker alone until M7 lands with the rest.

Verified: 155 passed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BScg8CF1sAAM2zVHAu5zvW
2026-08-16 23:23:47 +09:00
coolguy 3de0564650 freeze M6-M9 semantics and unit model 2026-08-16 19:48:19 +09:00
coolguy f798a1359f docs: resolve ownership and standard library spec audit 2026-08-16 17:29:45 +09:00
coolguyandClaude Opus 5 41de8aa2dc docs: revise spec to v0.1.6 and drop stale handoff
R8을 파생 반환 규칙으로 교체해 str.trim 계열의 슬라이스 반환을 표현 가능하게
하고, 결과를 지역 변수에 바인딩할 수 있게 한다. R6의 대여 구간을 마지막 사용
지점까지로 좁히고, R10에 전역 대여 금지를 추가해 호출 경계에서 배타성이 깨지던
구멍을 막는다. error.Name 코드 부여를 링크 심볼에서 드라이버의 emit 이전 단계로
옮겨 컴파일타임 상수로 만들고, str을 []u8과 별개 타입으로 분리한다.

문법 결함(struct 멤버의 pub, enum 배리언트 필드, catch/orelse 프로덕션,
error_decl, expr 규범)과 CLI 플래그 산재, 문서-구현 드리프트를 함께 정리한다.
변경 사유는 SPEC.AUDIT.md에 기록했다.

HANDOFF.md는 기준 SHA와 통신 프로토콜이 모두 낡아 제거한다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012PQm6oAvWX4Lp3iSN5AHGT
2026-08-16 16:54:34 +09:00
coolguy 57b47a574a docs: disambiguate control-flow headers 2026-08-16 08:42:21 +09:00
coolguy 95de333da4 docs: disambiguate match scrutinees 2026-08-16 08:33:19 +09:00
coolguy 3aa7618d0c docs: clarify char and byte conversions 2026-08-16 08:16:24 +09:00