---
title: "SD0116: a scalar cast applied to a non-scalar value"
description: "SD0116, TypeShade 컴파일러의 오류 코드입니다. a scalar cast applied to a non-scalar value"
url: https://typeshade.dev/ko/reference/errors/sd0116/
language: ko
---

# `SD0116`

코어 코드

a scalar cast applied to a non-scalar value

이 사이트의 `"use typeshade"` 프로그램 가운데 이 코드를 내는 것이 없어서 이 페이지에는 예제가 없습니다. [`fn()`](https://typeshade.dev/ko/api/fn/) 빌더는 IR을 직접 만들기 때문에 소스 절에 적힌 줄의 검사에 닿습니다.

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

## 발생 조건

A scalar cast applied to a vector used to type-check on both authoring surfaces and emit `f32(v)`, which no target compiles. The cast methods and the node forms of `f32`/`i32`/`u32`/`f64` are bounded to a scalar receiver at tsc; this covers a widened or untyped caller.

## 고치는 법

레지스트리의 힌트: `f32`/`i32`/`u32`/`f64` and the .f32()/.i32()/.u32()/.f64() methods convert one scalar — convert per component, or rebuild the vector with `vec3`(a.f32(), b.f32(), c.f32())

## 함께 보기

- [타입](https://typeshade.dev/ko/guide/language/types/)
- [`TypeShadeError`](https://typeshade.dev/ko/api/typeshadeerror/)
- [`f32`](https://typeshade.dev/ko/reference/types/f32/)
- [오류 코드](https://typeshade.dev/ko/reference/errors/)

## 소스

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

- [`src/core/ir/node.ts:739`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/node.ts#L739)
