SD0006
코어 코드
component access on a non-vector
레지스트리 설명과 컴파일러 메시지는 컴파일러 원문이라 한국어 페이지에서도 영어로 둡니다.
프런트엔드에서
같은 실수를 한 "use typeshade" 파일은 이 검사까지 오지 않습니다. 프런트엔드가 자기 코드로 먼저 거부하기 때문입니다. 빌드할 때 컴파일한 아래 프로그램에는 다음 진단이 나옵니다.
"use typeshade"
@fragmentexport function main(@location(0) uv: vec2): vec4 { const s = uv.x return vec4(s.x, 0., 0., 1.)}TS8022 error, 6행: .x on f32 — swizzle requires vec2/vec3/vec4.
함께 보기
-
TS8022UNKNOWN_NAME - Reference to a name TypeShade cannot resolve (identifier, struct field, or struct shape) that is not a function call (
UNKNOWN_FN) or a type name (UNKNOWN_TYPE), in a body a call lowers or in one no call lowers; a name the library declares for TypeScript's own use (Object,Math,Symbol), or the file declares as an enum, a namespace, a class or a type, read as a value says what it is.
소스
커밋 c66579bf에서 컴파일러가 이 코드를 내는 곳입니다. 파일마다 한 줄씩 적었습니다.