- 신선한 탐사자(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
9 lines
606 B
Text
9 lines
606 B
Text
--!strict
|
|
-- lifecycle-hooks-plan.md: "Luau 함수 타입은 파라미터에 반변이라 인자를 덜 받는 함수가 대입 가능"
|
|
type Ref = { Value: number }
|
|
local function OnCreated(fn: (inst: string, ref: Ref) -> ()): () return end
|
|
OnCreated(function(inst) print(inst) end) -- 1-인자 람다
|
|
OnCreated(function(inst: string) print(inst) end) -- 주석 붙은 1-인자
|
|
OnCreated(function(inst, ref) print(inst, ref.Value) end)
|
|
local f: (number, string) -> () = function(x: number) end
|
|
local g: (number) -> () = function(x: number, y: string) end -- 더 받는 쪽: 에러여야 정상
|