TS8073
프런트엔드 코드 REFERENCE
A reference parameter written or passed where this version does not take one (Rule 8.25, surface §70, proposal 0040): a Ref<T> parameter handed a value rather than ref(x); ref(...) handed something that is not a place a function may write (a value parameter, a const that may share its value, a read-only binding, a literal, a temporary, a component of a vector); ref(...) anywhere but as the argument of a Ref<T> parameter, and handed to a parameter that takes a value; Ref<T> anywhere but as a parameter of a function declared at the top of the file or of a namespace (a return, a field, a local, a method's, a local function's, an entry's, a generic function's); and a local function that captures a Ref<T> parameter.
이 커밋에는 아직 이 코드의 예제가 없습니다.
레지스트리 설명과 컴파일러 메시지는 컴파일러 원문이라 한국어 페이지에서도 영어로 둡니다.
발생 조건
A reference parameter written or passed where this version does not take one (Rule 8.25, surface §70, proposal 0040): a Ref<T> parameter handed a value rather than ref(x); ref(...) handed something that is not a place a function may write (a value parameter, a const that may share its value, a read-only binding, a literal, a temporary, a component of a vector); ref(...) anywhere but as the argument of a Ref<T> parameter, and handed to a parameter that takes a value; Ref<T> anywhere but as a parameter of a function declared at the top of the file or of a namespace (a return, a field, a local, a method's, a local function's, an entry's, a generic function's); and a local function that captures a Ref<T> parameter. Each names the edit.
이 코드가 적용하는 규칙
- 규칙 8.25 테스트
- A parameter declared
Ref<T>names the caller’s place, and the call passes it asref(place): reading the parameter reads that place, and assigning to it, or to a field, component or element of it, writes it, for the call.
함께 보기
소스
커밋 c66579bf에서 컴파일러가 이 코드를 내는 곳입니다. 파일마다 한 줄씩 적었습니다.