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>
class DF64Vec2 {
a: f32
}
@fragment
export function main(uv: location<0, vec2>): vec4 {
let d = new DF64Vec2()
d.a = f32(u.x * u.x)
return vec4(uv, d.a, 1.)
}

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

TS8015 error, line 1: Backend emit failed: typeshade [SD0043]: reserved fp64 name — struct 'DF64Vec2' 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>
class Pair {
a: f32
}
@fragment
export function main(uv: location<0, vec2>): vec4 {
let d = new Pair()
d.a = f32(u.x * u.x)
return vec4(uv, d.a, 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 af54ddad5, one line per file:

Edit this page Report a problem