quad/.claude/audit/handtrace-round10-reference-impl/spikes/ty4_effect_ret.luau
qwreey d2d67c7aeb
qa: 10라운드 광범위 탐사 완료 — 발견 H-150~H-157 (🔴 0 / 🟡 5 / 🟢 3), §4 배치 문항 7건 회신 대기
- 신선한 탐사자(fable) 단일 컨텍스트, 지시서 -round10-brief.md §2 레인 A·C 완료, B 부분, D ALL PASS
- audit/handtrace-round10-reference-impl/: round7 참조 구현을 현재 계약으로 갱신·재실행
  (부수: round7/ref9 _recompute 첫 인자 오류 발견·정정)
- base/·인덱스 레이어는 미변경 — 결정은 사용자 배치 회신 뒤 -round10-followup.md로

Co-authored-by: qwreey <me@qwreey.moe>
Claude-Session: https://claude.ai/code/session_01546hjsYNLSMZdHdPyTZaGb
2026-08-28 01:03:05 +09:00

23 lines
916 B
Text

--!strict
export type EffectHandle = { Rerun: (self: EffectHandle) -> () }
-- (i) 확정된 시그니처
local function EffectA(fn: (self: EffectHandle) -> (() -> ())?) end
EffectA(function(self) end) -- 흔한 모양
EffectA(function(self) return nil end) -- 명시적 nil
EffectA(function(self) return function() end end) -- cleanup
-- (ii) 조건 분기가 있는 경우 — 한쪽만 반환
EffectA(function(self)
if math.random() > 0.5 then return function() end end
end)
-- (iii) 가변 반환 팩으로 열기
local function EffectB(fn: (self: EffectHandle) -> ...(() -> ())) end
EffectB(function(self) end)
EffectB(function(self) return function() end end)
-- (iv) 유니온 함수 타입
local function EffectC(fn: ((self: EffectHandle) -> ()) | ((self: EffectHandle) -> (() -> ()))) end
EffectC(function(self) end)
EffectC(function(self) return function() end end)