SD0020
On this page

SD0020

Core code

module validation failed

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

In the front end

A "use typeshade" file never reaches this check with the same mistake: the front end refuses it first, under its own code. This program, compiled at build time, gets:

example.shade.ts
"use typeshade"
class VsOut {
@builtin("position") pos: vec4
@location(0) uv: vec2
}
@vertex
export function vs(@builtin("vertex_index") i: u32): VsOut {
return { pos: vec4(0., 0., 0., 1.), uv: vec2(0., 0.) }
}
@fragment
export function fs(@location(1) uv: vec2): vec4 {
return vec4(uv, 0., 1.)
}

TS8010 error, line 13: fs's parameter "uv" reads @location(1), which "vs" does not produce.

See also

TS8010 STRUCT_FIELD
An invalid struct field or declaration shape.

Source

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

Edit this page Report a problem