SD0112
코어 코드
a local name is declared twice in one function
이 사이트의 "use typeshade" 프로그램 가운데 이 코드를 내는 것이 없어서 이 페이지에는 예제가 없습니다. fn() 빌더는 IR을 직접 만들기 때문에 소스 절에 적힌 줄의 검사에 닿습니다.
레지스트리 설명과 컴파일러 메시지는 컴파일러 원문이라 한국어 페이지에서도 영어로 둡니다.
발생 조건
The optimizer's per-function maps are keyed on a binding's name alone, so a duplicate name merges two bindings. Reported per violation by the no-shadowed-local rule (core, so at every emit on both writers) and thrown by fixpoint, which additionally covers a direct optimizeAt() caller and the post-lowering module the rule never sees.
고치는 법
레지스트리의 힌트: rename one of the two bindings, or omit the name (b.let(value) / b.var(type)) to take a function-unique auto name — the optimizer keys its per-function maps on the name alone, so two bindings sharing one name collapse into one
함께 보기
소스
커밋 c66579bf에서 컴파일러가 이 코드를 내는 곳입니다. 파일마다 한 줄씩 적었습니다.