---
title: "TS8099 UNSUPPORTED: TypeShade 컴파일러가 진단에 붙이는 오류 코드 한 가지"
description: "TS8099 UNSUPPORTED, TypeShade 컴파일러의 오류 코드입니다. 자기 코드를 받을 만하지 않은 진단을 위한 포괄 코드입니다. 순차 범위 뒤인 TS8099에 따로 둡니다."
url: https://typeshade.dev/ko/reference/errors/ts8099/
language: ko
---

# `TS8099`

프런트엔드 코드 `UNSUPPORTED`

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

레지스트리에는 이 상수에 대한 문서 주석이 없습니다. 그래서 위 설명은 컴파일러가 이 코드와 함께 내는 메시지를 보고 이 사이트가 쓴 것입니다.

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

## 예제

example.shade.ts

```ts
"use typeshade"

@fragment
export function main(uv: location<0, vec2>): vec4 {
  let g = 0.
  do {
    g += 0.5
  } while (g < 1.)
  return vec4(g, g, g, 1.)
}
```

빌드할 때 고정된 컴파일러로 이 프로그램을 컴파일하면 다음 진단이 나옵니다.

**TS8099** error, 6행: do…while is not supported: the IR has one loop shape, a top-tested "for", and a do…while runs its body before the first test. Write "while (c) { … }" with the body's first pass unrolled above it, or a counted "for".

## 고치는 법

같은 프로그램을 고친 모습입니다. 진단 없이 컴파일됩니다.

example.shade.ts

```ts
"use typeshade"

@fragment
export function main(uv: location<0, vec2>): vec4 {
  let g = 0.5
  while (g < 1.) {
    g += 0.5
  }
  return vec4(g, g, g, 1.)
}
```

## 이 코드가 적용하는 규칙

**[규칙 6.1](https://typeshade.dev/ko/reference/rules/6-1/) 테스트**

A resource must be written `declare const x: uniform<T>`, `declare const x: storage<T>`, `declare const x: storage<T, "read_write">`, or `declare const x: <texture or sampler type>`.

**[규칙 6.2](https://typeshade.dev/ko/reference/rules/6-2/) 테스트**

A storage binding’s access mode is inferred from what the program does: a binding that some entry writes, by assignment, a mutating method, an atomic builtin, or a write through a function or a reference parameter, is `var<storage, read_write>`, and every other storage binding is `var<storage, read>`.

**[규칙 6.10](https://typeshade.dev/ko/reference/rules/6-10/) 테스트**

A local `const` binds its name once and leaves what it holds as writable as TypeScript does.

**[규칙 7.7](https://typeshade.dev/ko/reference/rules/7-7/) 테스트**

`discard` must be written as a bare statement, the identifier alone (`discard`), and may stand in a fragment entry and in a helper no vertex or compute entry can reach.

**[규칙 7.10](https://typeshade.dev/ko/reference/rules/7-10/) 테스트**

`T | undefined` and `T | null` are optional values.

**[규칙 8.3](https://typeshade.dev/ko/reference/rules/8-3/) 테스트**

A builtin WGSL confines by stage may be used in an entry of a permitted stage, and in a helper that no entry of an excluded stage can reach.

**[규칙 8.6](https://typeshade.dev/ko/reference/rules/8-6/) 테스트**

An entry point must not be called from another function, and neither may a kernel function ([Rule 8.22](https://typeshade.dev/ko/reference/rules/8-22/)).

**[규칙 8.17](https://typeshade.dev/ko/reference/rules/8-17/) 테스트**

A local function (a `const` that holds an arrow function or a function expression, or a `function` declaration, written inside a function’s body) is a function of the module named after the body that declares it (surface §14), and it may read and write the variables of the functions around it, as a TypeScript closure does.

**[규칙 8.18](https://typeshade.dev/ko/reference/rules/8-18/) 테스트**

A function whose parameter has a function type, written out (`f: (x: f32) => f32`) or through a type alias of one, takes a function: a function declared at the top of the file or of a namespace, a method, a static method, a constructor, a field that holds a function ([Rule 8.16](https://typeshade.dev/ko/reference/rules/8-16/)) and a local function ([Rule 8.17](https://typeshade.dev/ko/reference/rules/8-17/)).

**[규칙 8.23](https://typeshade.dev/ko/reference/rules/8-23/) 테스트**

A kernel function’s parameter of an array with no size is the caller’s array (change 0142): the body reads its elements and its `.length`, writes its elements in place, and cannot assign it whole ([`TS8018`](https://typeshade.dev/ko/reference/errors/ts8018/)).

## 함께 보기

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

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

- [언어 가이드](https://typeshade.dev/ko/guide/language/)
- [오류 코드](https://typeshade.dev/ko/reference/errors/)

## 소스

커밋 af54ddad5에서 컴파일러가 이 코드를 내는 곳입니다. 파일마다 한 줄씩 적었습니다.

- [`src/compiler/ts/bindings.ts:134`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/bindings.ts#L134) (2곳)
- [`src/compiler/ts/diagnostic.ts:145`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/diagnostic.ts#L145)
- [`src/compiler/ts/lower/array-constructor/form.ts:92`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/array-constructor/form.ts#L92) (3곳)
- [`src/compiler/ts/lower/array-constructor/from.ts:117`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/array-constructor/from.ts#L117)
- [`src/compiler/ts/lower/array-constructor/lower.ts:98`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/array-constructor/lower.ts#L98) (2곳)
- [`src/compiler/ts/lower/array-constructor/lowering.ts:32`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/array-constructor/lowering.ts#L32) (2곳)
- [`src/compiler/ts/lower/array-methods.ts:112`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/array-methods.ts#L112) (6곳)
- [`src/compiler/ts/lower/array-methods/named-function.ts:57`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/array-methods/named-function.ts#L57)
- [`src/compiler/ts/lower/array-methods/value-methods.ts:68`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/array-methods/value-methods.ts#L68) (4곳)
- [`src/compiler/ts/lower/array-methods/value-refusals.ts:23`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/array-methods/value-refusals.ts#L23) (2곳)
- [`src/compiler/ts/lower/atomics.ts:51`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/atomics.ts#L51)
- [`src/compiler/ts/lower/collections.ts:39`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/collections.ts#L39)
- [`src/compiler/ts/lower/control.ts:58`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/control.ts#L58)
- [`src/compiler/ts/lower/control/for-of.ts:163`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/control/for-of.ts#L163) (2곳)
- [`src/compiler/ts/lower/control/for-update.ts:43`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/control/for-update.ts#L43)
- [`src/compiler/ts/lower/expression-array.ts:40`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/expression-array.ts#L40) (4곳)
- [`src/compiler/ts/lower/expression-call.ts:185`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/expression-call.ts#L185) (7곳)
- [`src/compiler/ts/lower/expression-call/gather.ts:43`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/expression-call/gather.ts#L43)
- [`src/compiler/ts/lower/expression-call/select-and-reduce.ts:60`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/expression-call/select-and-reduce.ts#L60) (2곳)
- [`src/compiler/ts/lower/expression-call/storage-depth.ts:210`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/expression-call/storage-depth.ts#L210)
- [`src/compiler/ts/lower/expression-call/texture-call.ts:151`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/expression-call/texture-call.ts#L151) (2곳)
- [`src/compiler/ts/lower/expression-misc.ts:56`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/expression-misc.ts#L56) (2곳)
- [`src/compiler/ts/lower/expression-prop.ts:110`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/expression-prop.ts#L110) (2곳)
- [`src/compiler/ts/lower/expression-prop/object-literal.ts:44`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/expression-prop/object-literal.ts#L44) (5곳)
- [`src/compiler/ts/lower/expression.ts:249`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/expression.ts#L249) (10곳)
- [`src/compiler/ts/lower/expression/identifier.ts:62`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/expression/identifier.ts#L62) (2곳)
- [`src/compiler/ts/lower/function-args.ts:140`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/function-args.ts#L140) (2곳)
- [`src/compiler/ts/lower/function.ts:1471`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/function.ts#L1471) (4곳)
- [`src/compiler/ts/lower/made-array/candidate.ts:111`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/made-array/candidate.ts#L111) (2곳)
- [`src/compiler/ts/lower/made-array/identity.ts:19`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/made-array/identity.ts#L19)
- [`src/compiler/ts/lower/made-array/lower.ts:37`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/made-array/lower.ts#L37)
- [`src/compiler/ts/lower/made-array/nest.ts:116`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/made-array/nest.ts#L116)
- [`src/compiler/ts/lower/made-array/settle.ts:88`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/made-array/settle.ts#L88) (2곳)
- [`src/compiler/ts/lower/optional-values.ts:257`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/optional-values.ts#L257)
- [`src/compiler/ts/lower/optional-values/operands.ts:36`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/optional-values/operands.ts#L36)
- [`src/compiler/ts/lower/runtime-array.ts:70`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/runtime-array.ts#L70)
- [`src/compiler/ts/lower/second-name.ts:64`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/second-name.ts#L64) (3곳)
- [`src/compiler/ts/lower/statement.ts:312`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/statement.ts#L312) (3곳)
- [`src/compiler/ts/lower/statement/binding-pattern.ts:41`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/statement/binding-pattern.ts#L41) (6곳)
- [`src/compiler/ts/lower/statement/declaration-forms.ts:32`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/statement/declaration-forms.ts#L32) (2곳)
- [`src/compiler/ts/lower/statement/declaration-kind.ts:77`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/statement/declaration-kind.ts#L77) (4곳)
- [`src/compiler/ts/lower/statement/expression-statement.ts:102`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/statement/expression-statement.ts#L102) (4곳)
- [`src/compiler/ts/math-binding.ts:95`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/math-binding.ts#L95) (8곳)
- [`src/compiler/ts/mixins.ts:18`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/mixins.ts#L18)
- [`src/compiler/ts/module-vars.ts:352`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/module-vars.ts#L352)
- [`src/compiler/ts/module.ts:93`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/module.ts#L93)
- [`src/compiler/ts/stage-restrictions.ts:229`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/stage-restrictions.ts#L229)
- [`src/compiler/ts/storage-access.ts:155`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/storage-access.ts#L155) (3곳)
- [`src/compiler/ts/structs/with-shapes.ts:27`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/structs/with-shapes.ts#L27)
- [`src/core/coverage/glsl/statements-and-preprocessor.ts:59`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/coverage/glsl/statements-and-preprocessor.ts#L59)
- [`src/language-service/check.ts:114`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/language-service/check.ts#L114)
- [`src/language-service/diagnostics/readonly-write.ts:63`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/language-service/diagnostics/readonly-write.ts#L63)
- [`src/language-service/diagnostics/refused-uses.ts:246`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/language-service/diagnostics/refused-uses.ts#L246)
