SD0043
On this page

SD0043

Core code

reserved fp64 name

The registry text and every compiler message on these pages are the compiler's own English.

Example

example.shade.ts
"use typeshade"
class Uniforms {
x: f64
}
declare const u: uniform<Uniforms>
function df64_add(a: f32, b: f32): f32 {
return a + b
}
@fragment
export function main(@location(0) uv: vec2): vec4 {
return vec4(uv, df64_add(f32(u.x * u.x), 0.), 1.)
}

Compiled at build time against the pinned compiler, this program gets:

TS8015 error, line 1: Backend emit failed: typeshade [SD0043]: reserved fp64 name — fn 'df64_add' hint: fp64Lower injects df64_* emulation fns and DF64VecN structs under those names — rename the colliding declaration

How to fix it

The registry's hint: fp64Lower injects df64_* emulation fns and DF64VecN structs under those names — rename the colliding declaration

The same program, corrected. It compiles with no diagnostic.

example.shade.ts
"use typeshade"
class Uniforms {
x: f64
}
declare const u: uniform<Uniforms>
function addNarrow(a: f32, b: f32): f32 {
return a + b
}
@fragment
export function main(@location(0) uv: vec2): vec4 {
return vec4(uv, addNarrow(f32(u.x * u.x), 0.), 1.)
}

See also

TS8015 BACKEND
A backend that refused to emit a module the front end accepted. The message is the backend's own.

Source

Where the compiler raises this code at commit 26de7be8, one line per file:

Edit this page Report a problem