---
title: "TypeShade 오류 코드: 컴파일러가 진단에 붙이는 코드를 모두 모아 코드별로 정리한 목록"
description: "TypeShade 컴파일러가 내는 프런트엔드 코드 51개와 코어 코드 36개입니다. 코드마다 뜻을 싣고, 프로그램으로 낼 수 있는 코드는 그 프로그램과 고친 모습도 보여 줍니다."
url: https://typeshade.dev/ko/reference/errors/
language: ko
---

# 오류 코드

코드 92개

컴파일러가 진단에 붙이는 코드를 모두 모았습니다. 커밋 af54ddad5의 레지스트리 두 곳에서 읽었습니다. `"use typeshade"` 프런트엔드의 코드는 51개이고, 그 아래 코어 IR 계층의 코드는 36개입니다.

51개 페이지에는 코드를 내는 프로그램과 그 프로그램을 고친 모습이 함께 실려 있습니다. 둘 다 빌드할 때 고정된 컴파일러로 컴파일하므로, 프로그램이 더는 그 코드를 내지 않거나 고친 프로그램에 진단이 남으면 빌드가 멈춥니다. 예제 태그가 붙은 행이 그런 페이지입니다.

레지스트리 설명과 컴파일러 메시지는 컴파일러 원문이라 한국어 페이지에서도 영어로 둡니다.

## 프런트엔드 코드

`TS80xx` 코드는 프런트엔드의 `TS_CODES`에 들어 있습니다. `"use typeshade"` 파일은 IR을 만들기 전에 이 코드들로 먼저 검사받습니다.

### 파일

**[`TS8001`](https://typeshade.dev/ko/reference/errors/ts8001/) `MISSING_DIRECTIVE` 예제**

TypeShade로 컴파일하는 파일에 `"use typeshade"` 지시문이 아예 없습니다.

**[`TS8013`](https://typeshade.dev/ko/reference/errors/ts8013/) `HOST_STMT` 예제**

셰이더에 없는 호스트 제어 흐름과 JavaScript 런타임 형태입니다. `await`, `yield`, `async` 함수와 제너레이터 함수, `try`/`catch`/`throw`, `for…in`, `var`, 객체 리터럴 밖의 스프레드, 템플릿 문자열이 그렇습니다. `new`는 클래스 규칙이어서 `CLASS_MEMBER`입니다.

**[`TS8014`](https://typeshade.dev/ko/reference/errors/ts8014/) `TOP_LEVEL` 예제**

파일 최상위에 컴파일러가 선언으로 받을 수 없는 것이 있습니다. 선언이 아닌 문이거나, 거부하는 형태의 모듈 수준 선언입니다.

**[`TS8030`](https://typeshade.dev/ko/reference/errors/ts8030/) `SYNTAX` 예제**

`"use typeshade"` 파일의 TypeScript 구문 오류입니다. 닫히지 않은 괄호, 빠진 중괄호, 예상하지 못한 토큰이 그렇습니다. 이런 파일은 낮추거나 내보내지 않습니다. 언어 서비스는 대신 TypeScript 자체의 구문 진단을 보여 줍니다.

**[`TS8050`](https://typeshade.dev/ko/reference/errors/ts8050/) `ENABLE_NAME` 예제**

WGSL 백엔드의 기능 프로필이 가진 확장 어휘 밖의 이름을 쓴 파일 수준 `"enable <extension>";` 지시문입니다. 이름을 잘못 쓰면 평범한 문자열 문이 되어 아무것도 켜지 않으므로 이 코드가 막습니다.

**[`TS8072`](https://typeshade.dev/ko/reference/errors/ts8072/) `IMPORT` 예제**

컴파일러가 따라가지 않는 import입니다([규칙 3.9](https://typeshade.dev/ko/reference/rules/3-9/)). 파일을 가리키지 않거나 이 컴파일이 읽을 수 없는 경로, 셰이더 모듈이 아닌 파일, `node_modules`에 없는 패키지, 패키지의 `exports`가 이름 붙이지 않은 하위 경로, 모듈이 내보내지 않는 이름, 셰이더 모듈에 쓸모없는 형태(기본 import나 export, 아무것도 가져오지 않는 import, `import(...)`, `require`)가 그렇습니다.

**[`TS8099`](https://typeshade.dev/ko/reference/errors/ts8099/) `UNSUPPORTED` 예제**

자기 코드를 받을 만하지 않은 진단을 위한 포괄 코드입니다. 순차 범위 뒤인 TS8099에 따로 둡니다.

### 타입과 이름

**[`TS8002`](https://typeshade.dev/ko/reference/errors/ts8002/) `UNKNOWN_TYPE` 예제**

아무것도 선언하지 않은 타입 이름입니다. 매개변수, 타입 인자, 별칭, `implements` 절, 기반 클래스 어디에 써도 걸리고, 이 표면이 매퍼가 읽는 자리에서 받지 않는 타입도 여기에 속합니다([규칙 2.1](https://typeshade.dev/ko/reference/rules/2-1/)). 파일이 선언했지만 구조체로 모으지 않은 기반은 `STRUCT_FIELD`입니다.

**[`TS8003`](https://typeshade.dev/ko/reference/errors/ts8003/) `TYPE_MISMATCH` 예제**

연산자나 조건, 선언, 반환, 인자처럼 두 값이 만나는 자리에서 타입이 서로 맞지 않거나, 검사로 좁히지 않은 선택적 값(`T | undefined`, `T | null`, `T | null | undefined`)을 읽거나([규칙 7.10](https://typeshade.dev/ko/reference/rules/7-10/)), 컴파일러가 접는 상수를 WGSL이 거부합니다. 31을 넘는 시프트 양, 0인 제수, 서로 엇갈린 clamp 경계, 범위를 넘는 `f32` 값, `Math.pow(-2., 2.)`처럼 정의역 밖에서 부르는 내장 함수가 그렇습니다.

**[`TS8005`](https://typeshade.dev/ko/reference/errors/ts8005/) `CONST_ASSIGN` 예제**

바뀔 수 없는 이름이나 자리에 값을 대입합니다. `const`에 담은 수나 벡터, `const` 벡터나 행렬의 성분, `readonly` 필드나 static, 그리고 `readonly`나 `"read"`로 쓰지 않겠다고 약속한 스토리지 바인딩에는 값을 쓸 수 없습니다. `const` 객체의 필드나 원소에 쓰는 것은 여기에 해당하지 않습니다. `const`는 객체를 담고 있을 뿐이고, 객체는 JavaScript에서처럼 계속 쓸 수 있기 때문입니다([규칙 6.10](https://typeshade.dev/ko/reference/rules/6-10/)).

**[`TS8010`](https://typeshade.dev/ko/reference/errors/ts8010/) `STRUCT_FIELD` 예제**

구조체 필드나 선언의 모양이 잘못되었습니다. 필드가 없는 클래스는 받아들입니다. 이 코드는 잘못된 필드 선언, 클래스가 아닌 빈 구조체, 적용되지 않는 필드의 `@align`, 사용처마다 location이 둘로 갈리는 사용자 정의 값을 다룹니다([규칙 6.6](https://typeshade.dev/ko/reference/rules/6-6/)).

**[`TS8016`](https://typeshade.dev/ko/reference/errors/ts8016/) `INDEX_OOB` 예제**

상수 인덱스가 대상의 길이를 벗어납니다.

**[`TS8018`](https://typeshade.dev/ko/reference/errors/ts8018/) `ASSIGN_TARGET` 예제**

임시 값처럼 쓸 수 있는 자리가 아닌 곳에 대입하거나 `++`/`--`를 씁니다. 모르는 이름은 `UNKNOWN_NAME`이고, 알려진 불변 바인딩에 쓰는 것은 `CONST_ASSIGN`입니다.

**[`TS8022`](https://typeshade.dev/ko/reference/errors/ts8022/) `UNKNOWN_NAME` 예제**

TypeShade가 풀지 못하는 이름을 가리킵니다. 함수 호출(`UNKNOWN_FN`)이나 타입 이름(`UNKNOWN_TYPE`)은 아닙니다. 라이브러리가 TypeScript 자체를 위해 선언한 이름(`Object`, `Math`, `Symbol`)이나 파일이 enum, 네임스페이스, 클래스, 타입으로 선언한 이름을 값으로 읽으면, 메시지가 그 이름이 무엇인지 알려 줍니다.

**[`TS8023`](https://typeshade.dev/ko/reference/errors/ts8023/) `DUPLICATE_SYMBOL` 예제**

한 범위에서 같은 함수, 바인딩, 모듈 상수, 구조체 이름을 두 번 선언합니다. 구조체는 어떤 표기로 선언했든 셉니다. 클래스, 인터페이스, 타입 별칭이 같은 이름이면 구조체 하나이므로 두 번째 선언은 중복입니다.

**[`TS8068`](https://typeshade.dev/ko/reference/errors/ts8068/) `RESERVED_NAME` 예제**

변수, 매개변수, 함수가 `eval`이나 `arguments`를 이름으로 씁니다. ECMAScript의 엄격 모드와 그에 따르는 TypeScript가 어떤 선언도 허용하지 않는 이름입니다(규칙 2.1).

**[`TS8075`](https://typeshade.dev/ko/reference/errors/ts8075/) `UNASSIGNED_READ` 예제**

모든 경로에서 대입되기 전에 지역 변수를 읽습니다([규칙 7.6](https://typeshade.dev/ko/reference/rules/7-6/)). TypeScript의 TS2454 규칙을 따릅니다. 인자도 읽기이며, 어떤 호출도 호출자의 지역 변수에 대입하지 않습니다. TypeScript가 TS2454를 보고하는 자리에서 편집기는 이 코드를 보여 줍니다.

### 함수와 클래스

**[`TS8004`](https://typeshade.dev/ko/reference/errors/ts8004/) `UNKNOWN_FN` 예제**

파일이 선언하지도 가져오지도 않은 함수를 부르거나, ECMAScript 표기가 있어서 언어에서 뺀 내장 함수를 부릅니다. `arrayLength(xs)`가 그 예이며, 메시지가 대신 쓸 `xs.length`를 알려 줍니다([규칙 9.9](https://typeshade.dev/ko/reference/rules/9-9/)).

**[`TS8019`](https://typeshade.dev/ko/reference/errors/ts8019/) `ARITY_MISMATCH` 예제**

호출이나 생성자에서 인자, 요소, 필드의 개수가 맞지 않습니다.

**[`TS8020`](https://typeshade.dev/ko/reference/errors/ts8020/) `FUNCTION_SHAPE` 예제**

TypeShade가 지원하지 않는 함수 선언이나 매개변수 모양입니다. 이름이나 본문이 없는 경우, 나머지 매개변수, 구조 분해 매개변수가 그렇습니다.

**[`TS8021`](https://typeshade.dev/ko/reference/errors/ts8021/) `RETURN_SHAPE` 예제**

`return`의 모양이 잘못되었습니다. 값이 필요한 곳의 값 없는 `return`, `undefined`를 반환하면서 값은 없는 함수, 반환 타입 표기가 없는데 값을 반환하는 compute 진입점이 그렇습니다.

**[`TS8031`](https://typeshade.dev/ko/reference/errors/ts8031/) `RECURSION` 예제**

호출 순환입니다. 함수가 직접, 또는 다른 함수를 거쳐 자기 자신에 닿습니다. WGSL에는 호출 스택이 없으므로 컴파일러가 타깃이 보기 전에 순환을 거부합니다.

**[`TS8035`](https://typeshade.dev/ko/reference/errors/ts8035/) `CLASS_MEMBER` 예제**

표면이 받지 않는 클래스 멤버 모양, 클래스 규칙이 거부하는 멤버 사용, 클래스를 만들지 않는 `new`입니다([규칙 8.13](https://typeshade.dev/ko/reference/rules/8-13/)). getter와 setter, static 필드와 메서드, 오버로드 시그니처, abstract 멤버, `#` 비공개 이름, 객체를 바꾸는 메서드는 모두 컴파일됩니다. 메시지가 멤버나 대상과 고칠 방법을 알려 줍니다.

**[`TS8036`](https://typeshade.dev/ko/reference/errors/ts8036/) `MATH_ARGUMENT` 예제**

시그니처가 받지 않는 인자로 수학 내장 함수를 부릅니다. 모양이 맞아야 하는 두 값(`dot(vec3, vec2)`), 내장 함수에 해당 형태가 없는 요소 종류(정수 벡터의 `sin`), 벡터가 와야 할 곳의 스칼라(`normalize(s)`), 타입이 잘못된 계수, 지수, 오프셋, 개수가 그렇습니다. 메시지는 문제의 인자와, 짧게 고칠 수 있으면 방법을 알려 줍니다. 스칼라를 펼치거나, 한쪽을 변환하거나, 벡터 크기를 맞춥니다.

### 제어 흐름

**[`TS8006`](https://typeshade.dev/ko/reference/errors/ts8006/) `LOOP_BOUND` 예제**

컴파일러가 조건을 받아들이지 않는 루프입니다. 시작값, 경계, 증분이 모두 상수인 `for`에서 조건이 거짓이 되기 전에 카운터가 타입의 범위를 벗어나거나, 루프 조건 안에서 값을 쓰는 함수를 호출합니다. 이름이 아닌 배열을 도는 `for...of`도 이 코드로 거부됩니다.

**[`TS8007`](https://typeshade.dev/ko/reference/errors/ts8007/) `LOOP_INFINITE` 예제**

끝나지 않는 것이 확실한 루프입니다. `break`나 `return`이 없는 `while (true)`나 조건 없는 `for`가 그렇고, 경계가 상수인 `for`에서 카운터를 경계 쪽으로 움직이지 않는 증분도 그렇습니다. 조건은 그대로 썼든 상수만으로 계산했든 같습니다.

**[`TS8008`](https://typeshade.dev/ko/reference/errors/ts8008/) `LOOP_INDUCTION` 예제**

`for...of` 루프가 `for (const x of xs)`나 `for (let x of xs)`처럼 요소 하나를 선언하지 않습니다.

**[`TS8009`](https://typeshade.dev/ko/reference/errors/ts8009/) `BREAK_OUTSIDE` 예제**

감싸는 루프나 `switch`가 없는 곳에 `break`를 썼습니다.

**[`TS8017`](https://typeshade.dev/ko/reference/errors/ts8017/) `SWITCH_CASE` 예제**

잘못된 `switch` case입니다. 정수 상수가 아니거나 셀렉터에 맞지 않거나 다른 레이블과 겹치는 레이블, 함께 쓸 본문이 아래에 없는 빈 절, 본문이 있는 절 위에서 끝에 닿을 수 있는 본문(TypeScript는 다음 절로 넘어가지만 WGSL은 그렇지 않습니다, [규칙 7.3](https://typeshade.dev/ko/reference/rules/7-3/)), 그리고 루프가 감싸지 않은 switch 안의 `continue`가 그렇습니다.

**[`TS8034`](https://typeshade.dev/ko/reference/errors/ts8034/) `BARRIER_PLACEMENT` 예제**

배리어가 놓일 수 없는 곳의 `workgroupBarrier()`나 `storageBarrier()`입니다. 워크그룹이 없는 정점이나 프래그먼트 진입점 안이거나, 배리어는 문이므로 값으로 쓴 경우입니다. 호출들이 공유하지 않는 제어 흐름 아래의 배리어는 `UNIFORMITY`입니다.

**[`TS8052`](https://typeshade.dev/ko/reference/errors/ts8052/) `UNIFORMITY` 예제**

배리어, `workgroupUniformLoad`, 그리고 컴파일러의 재작성이 닿지 못하는 도함수나 암묵적 LOD 샘플이 균일하지 않은 값에 대한 조건 아래에 있거나, 그런 조건 아래에서 실행한 `return`, `break`, `continue` 뒤에 있습니다([규칙 8.5](https://typeshade.dev/ko/reference/rules/8-5/)). 메시지가 작성자가 쓴 그대로의 값과 그 문장을 알려 줍니다.

### 진입점과 입출력

**[`TS8024`](https://typeshade.dev/ko/reference/errors/ts8024/) `BUILTIN_NAME` 예제**

`@builtin("...")`의 이름 인자가 잘못되었거나, WGSL 내장 어휘에 없는 id입니다.

**[`TS8025`](https://typeshade.dev/ko/reference/errors/ts8025/) `BUILTIN_STAGE` 예제**

`@builtin(...)` id를 다른 스테이지의 입력이나 출력으로 씁니다. 예를 들어 정점 반환에 `frag_depth`를, 정점 매개변수에 `front_facing`을 씁니다.

**[`TS8026`](https://typeshade.dev/ko/reference/errors/ts8026/) `WORKGROUP_SHAPE` 예제**

경고입니다. `@compute([x, y, z])`가 WebGPU의 기본 compute 한도(`x`와 `y`는 256, `z`는 64, 전체 호출은 256)를 넘으므로, 한도를 올리지 않고 요청한 장치는 파이프라인을 거부합니다.

**[`TS8028`](https://typeshade.dev/ko/reference/errors/ts8028/) `ATTRIBUTE_NAME` 예제**

이 표면이 읽지 않는 데코레이터나 진입점 형태입니다. 속성 어휘(`@vertex`, `@fragment`, `@compute`, `@builtin`, `@location`) 밖의 식별자(`@vertx` 같은 오타), 표면이 다른 방식으로 쓰거나 빌려 오지 않는 WGSL 속성(직접 쓴 `@diagnostic(…)` 같은 것), `vertex(f)`처럼 호출로 쓴 스테이지, `export default`처럼 [규칙 8.1](https://typeshade.dev/ko/reference/rules/8-1/)이 거부하는 형태로 쓴 진입점, 데코레이터를 받지 않는 선언이나 자리에 붙은 데코레이터가 그렇습니다([규칙 6.7](https://typeshade.dev/ko/reference/rules/6-7/)). 이 코드가 없으면 데코레이터를 붙인 함수나 필드가 아무 말 없이 진입점이나 IO 필드가 아니게 됩니다.

**[`TS8029`](https://typeshade.dev/ko/reference/errors/ts8029/) `STRUCT_FIELD_MISSING_ATTR` 예제**

compute 진입점의 사용자 정의 입력입니다. `builtin<…>`가 없는 매개변수나 그 구조체의 필드가 그렇습니다. WGSL의 compute 진입점에는 사용자 정의 입력이 없으므로 프런트엔드가 거부합니다. 정점이나 프래그먼트 진입점에서는 속성이 없는 값이 사용자 정의 값이고, 컴파일러가 location을 줍니다(규칙 6.6).

**[`TS8037`](https://typeshade.dev/ko/reference/errors/ts8037/) `WORKGROUP_ARG` 예제**

`@compute(...)`의 인자가 정수 하나에서 셋으로 이루어진 배열 리터럴이 아닙니다. 객체, 숫자 하나, 식별자, 빈 배열, 원소가 넷인 배열이 그렇습니다. 기본 한도 검사는 `WORKGROUP_SHAPE`입니다.

### 리소스와 메모리

**[`TS8032`](https://typeshade.dev/ko/reference/errors/ts8032/) `UNSIZED_ARRAY_LENGTH` 예제**

스토리지가 아닌 곳의 크기 없는 `array<T>`에 `.length`를 씁니다. `uniform<array<T>>`, 지역 변수, 매개변수가 그렇습니다. 런타임 크기의 스토리지 배열은 버퍼에서 길이를 읽습니다. 다른 배열에는 크기를 명시해야 합니다.

**[`TS8033`](https://typeshade.dev/ko/reference/errors/ts8033/) `MODULE_VAR` 예제**

주소 공간이 허용하지 않는 곳에서 모듈 변수를 선언하거나 씁니다. 주소 공간 래퍼가 붙은 `const`, 초기값이 있는 `workgroup` 변수, 그 공간이 담을 수 없는 타입(텍스처, 런타임 크기 배열, 호출별 변수 안의 atomic), 상수가 아닌 초기값, 정점이나 프래그먼트 진입점이 닿는 `workgroup` 변수가 그렇습니다. 일반 최상위 `let`이 대신하게 된 `perInvocation<T>` 래퍼도 여기에 속합니다.

**[`TS8041`](https://typeshade.dev/ko/reference/errors/ts8041/) `TEXTURE_ARGUMENT` 예제**

타깃에 오버로드가 없는 텍스처 읽기의 일반 인자입니다. 텍스처 차원에 비해 너비가 틀렸거나 읽기가 받지 않는 요소 종류인 좌표나 기울기, 0 이상의 정수가 아닌 레이어, 밉 레벨, 샘플 인덱스, `f32`가 아닌 `level`, `bias`, `depth_ref`가 그렇습니다. 호출에 맞지 않는 텍스처 자체, 예를 들어 `textureStore`에 넘긴 샘플링용 텍스처는 `TYPE_MISMATCH`입니다.

**[`TS8051`](https://typeshade.dev/ko/reference/errors/ts8051/) `LAYOUT` 예제**

버퍼 바인딩의 저장 타입이 WGSL의 호스트 공유 규칙 하나를 어깁니다. `uniform`이나 `storage` 바인딩 안의 `bool`(단독이든 벡터든), 구조체의 마지막 멤버가 아닌 런타임 크기 `array<T>`, uniform 안의 런타임 크기 배열, uniform 안의 두 행 행렬(`mat2x2`, `mat3x2`, `mat4x2`)이 그렇습니다. 마지막은 WGSL과 std140이 서로 다른 오프셋에 배치합니다([규칙 4.8](https://typeshade.dev/ko/reference/rules/4-8/)).

**[`TS8079`](https://typeshade.dev/ko/reference/errors/ts8079/) `HOST_RESERVED_FIELD` 예제**

내보낸 바인딩의 클래스에 있는 필드 이름이 호스트 접근자의 멤버와 같습니다([규칙 6.1](https://typeshade.dev/ko/reference/rules/6-1/)). 내보낸 `uniform<T>`의 클래스나 내보낸 스토리지 배열 원소의 클래스에서는 `set`, 내보낸 `uniform<T>`의 클래스에서는 `needsUpdate`와 `dispose`가 그렇습니다. 호스트는 접근자로 필드를 설정하므로(`camera.pos.set(…)`) 접근자와 같은 이름의 필드에는 닿을 수 없습니다.

### 에뮬레이션 배정밀도

**[`TS8027`](https://typeshade.dev/ko/reference/errors/ts8027/) `MAT_UNSUPPORTED` 예제**

정방이 아닌 `matCxR<f64>`입니다. fp64 패스는 차원마다 double-float 본문 하나를 두므로 정방 double 행렬만 낮출 수 있습니다. 모든 `matCxR<f32>`는 타입입니다.

**[`TS8038`](https://typeshade.dev/ko/reference/errors/ts8038/) `F64_ENTRY_IO` 예제**

에뮬레이트한 double(`f64`나 `vec64`)이 진입점의 IO 경계에 있습니다. `@location` 매개변수, IO 구조체의 `@location` 필드, 진입점의 반환값이 그렇습니다. double은 낮춘 뒤 `f32` 워드 두 개이고, varying은 워드를 따로 보간합니다. `f32(x)`로 좁히거나, 필요한 스테이지에서 double을 읽으세요. uniform과 스토리지 바인딩은 `f64`를 담을 수 있습니다.

### 대상

**[`TS8015`](https://typeshade.dev/ko/reference/errors/ts8015/) `BACKEND` 예제**

프런트엔드가 받아들인 모듈을 백엔드가 출력하지 못하고 거부했습니다. 메시지는 백엔드가 쓴 그대로입니다.

### 폐기된 번호

**[`TS8011`](https://typeshade.dev/ko/reference/errors/ts8011/)**

Retired codes.

**[`TS8012`](https://typeshade.dev/ko/reference/errors/ts8012/)**

Retired codes.

**[`TS8053`](https://typeshade.dev/ko/reference/errors/ts8053/)**

Retired by change 0134 (INT\_LITERAL\_DEPRECATION): the warning of the window of, an undecided integer-written declaration "types as `f32` today; it will type as `i32`".

**[`TS8078`](https://typeshade.dev/ko/reference/errors/ts8078/)**

Retired by change 0131 (numerics): TS8078 was the refused numerical contract of change 0107; change 0131 removed the construct and retired the code.

**[`TS8080`](https://typeshade.dev/ko/reference/errors/ts8080/)**

Retired by change 0142 (VALUE\_ARRAY\_WRITE\_LOST): TS8080 was the refused write to an array parameter that no `return` carries back (change 0138, Amendment A15); change 0142 makes an array parameter the caller's object, so such a write is the program's meaning and no refusal has a true text.

### 그 밖의 코드

**[`TS8069`](https://typeshade.dev/ko/reference/errors/ts8069/) `MISPLACED_DIRECTIVE` 예제**

`"use typeshade"` 지시문이 다른 최상위 문 뒤에 있습니다([규칙 3.1](https://typeshade.dev/ko/reference/rules/3-1/)). ECMAScript에서 지시문은 맨 앞의 문자열 문일 뿐이어서 TypeScript는 늦게 온 지시문을 평범한 문자열로 읽습니다. 고치는 방법은 지시문을 더하는 것이 아니라 옮기는 것입니다. 지시문이 아예 없는 파일은 `MISSING_DIRECTIVE`입니다.

**[`TS8070`](https://typeshade.dev/ko/reference/errors/ts8070/) `KERNEL_LOOP_ON_CPU`**

독립성 증명이 거부한 커널 함수의 루프에 대한 경고입니다. 이 루프는 CPU에서 실행됩니다([규칙 8.22](https://typeshade.dev/ko/reference/rules/8-22/)). 메시지가 막는 줄과 이름, 그리고 고칠 방법을 알려 줍니다. 어느 쪽이든 프로그램은 올바릅니다.

**[`TS8071`](https://typeshade.dev/ko/reference/errors/ts8071/) `CONSOLE_NOT_RECORDED` 예제**

`compile(src, { console: 'gpu' })`에서 나오는 경고입니다. WGSL이 기록하지 않는 `console` 호출이 있습니다. 메시지가 이유를 알려 줍니다. 정점 진입점이 그 호출에 닿거나, 인자의 크기가 정해져 있지 않거나 값이 아니거나, 스테이지에 스토리지 버퍼를 더 둘 자리가 없습니다. 호출은 CPU에서는 여전히 싱크에 닿습니다([규칙 11.9](https://typeshade.dev/ko/reference/rules/11-9/)).

**[`TS8073`](https://typeshade.dev/ko/reference/errors/ts8073/) `REFERENCE`**

아직 지원하지 않는 참조 형태입니다([규칙 8.8](https://typeshade.dev/ko/reference/rules/8-8/), 변경 0142). 객체 매개변수는 표시 없이도 호출자의 객체이므로 없앤 `@inout`과 `@out`, 이름이 있는 객체를 돌려줄 수 있는 호출이 그렇습니다. 메시지가 고칠 방법을 알려 줍니다.

**[`TS8074`](https://typeshade.dev/ko/reference/errors/ts8074/) `REFERENCE_ALIAS`**

한 호출에서 한 객체에 이름이 둘이고, 그중 하나에 쓰기가 닿습니다. 둘 중 하나를 쓰는 `f`에 `f(a, a)`를 넘기거나, 이름을 직접 쓰는 함수에 모듈 변수를 넘기는 경우입니다. 메시지는 이 형태를 아직 지원하지 않는다고 말합니다(변경 0142).

**[`TS8077`](https://typeshade.dev/ko/reference/errors/ts8077/) `KERNEL_WORKGROUP_REDUCES` 예제**

`@workgroup_size`가 붙은 커널 함수에 환원하는 루프가 있습니다(규칙 8.22). 환원은 늘 256 크기의 트리로 실행되므로 다른 크기를 요청하는 속성은 지킬 수 없습니다. 메시지가 함수와 고칠 방법을 알려 줍니다.

## 코어 코드

`SDxxxx` 코드는 `typeshade/dev`가 내보내는 `CODES` 카탈로그에 들어 있습니다. 코어 IR 계층은 [`fn()`](https://typeshade.dev/ko/api/fn/) 빌더에서도 `"use typeshade"` 파일에서도 이 코드를 냅니다. 다만 같은 실수 가운데 상당수는 프런트엔드가 자기 코드로 먼저 거부합니다.

### 타입과 이름

**[`SD0001`](https://typeshade.dev/ko/reference/errors/sd0001/)**

matrix × vector size mismatch

**[`SD0002`](https://typeshade.dev/ko/reference/errors/sd0002/)**

binary op on mismatched vectors

**[`SD0003`](https://typeshade.dev/ko/reference/errors/sd0003/)**

arithmetic op on a bool operand

**[`SD0004`](https://typeshade.dev/ko/reference/errors/sd0004/)**

binary op on incompatible types

**[`SD0005`](https://typeshade.dev/ko/reference/errors/sd0005/)**

bitwise op requires a `u32`/`i32` left operand

**[`SD0006`](https://typeshade.dev/ko/reference/errors/sd0006/)**

component access on a non-vector

**[`SD0007`](https://typeshade.dev/ko/reference/errors/sd0007/)**

vector component out of range

**[`SD0008`](https://typeshade.dev/ko/reference/errors/sd0008/)**

swizzle on a non-vector

**[`SD0009`](https://typeshade.dev/ko/reference/errors/sd0009/)**

.select() on a non-bool condition

**[`SD0010`](https://typeshade.dev/ko/reference/errors/sd0010/)**

select branches have differing types

**[`SD0011`](https://typeshade.dev/ko/reference/errors/sd0011/)**

matchExpr case type does not match the default

**[`SD0015`](https://typeshade.dev/ko/reference/errors/sd0015/)**

array-texture layer must be an integer

**[`SD0116`](https://typeshade.dev/ko/reference/errors/sd0116/)**

a scalar cast applied to a non-scalar value

**[`SD0117`](https://typeshade.dev/ko/reference/errors/sd0117/)**

a one-argument .at(i) on a node that is not an array

### 빌더 호출

**[`SD0012`](https://typeshade.dev/ko/reference/errors/sd0012/)**

statement sink not installed

**[`SD0013`](https://typeshade.dev/ko/reference/errors/sd0013/)**

no active builder

**[`SD0113`](https://typeshade.dev/ko/reference/errors/sd0113/)**

a fn whose body returns nothing at the TypeScript level returns a value at run time

**[`SD0115`](https://typeshade.dev/ko/reference/errors/sd0115/)**

a branch body returned a value, which a branch cannot carry out

### 리소스와 메모리

**[`SD0014`](https://typeshade.dev/ko/reference/errors/sd0014/)**

override (specialization constant) must be a WGSL scalar type

**[`SD0016`](https://typeshade.dev/ko/reference/errors/sd0016/)**

host-owned resource has a shape the target cannot spell

**[`SD0114`](https://typeshade.dev/ko/reference/errors/sd0114/)**

a variable a function reads has no declaration in the module

### 대상

**[`SD0017`](https://typeshade.dev/ko/reference/errors/sd0017/)**

literal cannot be spelled by the target

**[`SD0020`](https://typeshade.dev/ko/reference/errors/sd0020/)**

module validation failed

**[`SD0030`](https://typeshade.dev/ko/reference/errors/sd0030/) 예제**

unsupported feature for this backend

### 에뮬레이션 배정밀도

**[`SD0040`](https://typeshade.dev/ko/reference/errors/sd0040/)**

`f64` type leaked past fp64Lower into a backend emitter

**[`SD0041`](https://typeshade.dev/ko/reference/errors/sd0041/)**

unsupported operation on `f64` operands

**[`SD0042`](https://typeshade.dev/ko/reference/errors/sd0042/)**

conflicting fp64 guard declaration

**[`SD0043`](https://typeshade.dev/ko/reference/errors/sd0043/) 예제**

reserved fp64 name

**[`SD0044`](https://typeshade.dev/ko/reference/errors/sd0044/)**

`f64` in an interpolated `@location` IO field

### 린트 규칙

**[`SD0107`](https://typeshade.dev/ko/reference/errors/sd0107/)**

assignment to an immutable 'let' binding

**[`SD0108`](https://typeshade.dev/ko/reference/errors/sd0108/) 예제**

smoothstep with constant edge0 >= edge1 (undefined in GLSL ES)

**[`SD0109`](https://typeshade.dev/ko/reference/errors/sd0109/)**

a fragment-only builtin is reachable from a vertex or compute entry

**[`SD0112`](https://typeshade.dev/ko/reference/errors/sd0112/)**

a local name is declared twice in one function

### 이식형 커널

**[`SD0110`](https://typeshade.dev/ko/reference/errors/sd0110/)**

portable declared on a non-compute entry

**[`SD0111`](https://typeshade.dev/ko/reference/errors/sd0111/)**

portable kernel outside the gather-only tier

### 그 밖의 코드

**[`SD0118`](https://typeshade.dev/ko/reference/errors/sd0118/)**

grad cannot differentiate this function

## 번호 매기기

프런트엔드 레지스트리는 번호가 비어 있는 구간마다 그 까닭을 함께 적어 둡니다.

TS8011 to TS8012: Retired codes. TS8012 was HOST\_API, a list of JavaScript globals refused by their spelling; a name nothing declares is UNKNOWN\_NAME, UNKNOWN\_FN or UNKNOWN\_TYPE by its position, and one the file declares is the file's (Rule 2.1). A gap is never reused.

TS8039 to TS8040: Unspent block of #162: while several sessions worked the issue list in parallel, each drew from a block of codes so that two branches in flight could not claim one number twice; F64\_ENTRY\_IO (TS8038) is the last code of the sequential range, and a block's unused codes (TS8039 to TS8067) stay unspent.

TS8042 to TS8049: Unspent block of #162 (TS8039 to TS8067); TEXTURE\_ARGUMENT (TS8041) and RESERVED\_NAME (TS8068) were assigned from blocks.

TS8053: Retired by change 0134 (INT\_LITERAL\_DEPRECATION): the warning of the window of #148, an undecided integer-written declaration "types as `f32` today; it will type as `i32`". Change 0134 infers a number's type from its uses and keeps no default for an author to learn, so the warning has no true text.

TS8054 to TS8067: Unspent block of #162 (TS8039 to TS8067); a block's unused codes stay unspent.

TS8076: Reserved by draft proposal 0052 (not on main), changes/0067-kernel-workgroup-size.md (decision D7) and changes/0107-numerical-contract.md; it stays unused while that draft is open.

TS8078: Retired by change 0131 (numerics): TS8078 was the refused numerical contract of change 0107; change 0131 removed the construct and retired the code.

TS8080: Retired by change 0142 (VALUE\_ARRAY\_WRITE\_LOST): TS8080 was the refused write to an array parameter that no `return` carries back (change 0138, Amendment A15); change 0142 makes an array parameter the caller's object, so such a write is the program's meaning and no refusal has a true text.
