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"
interface VsOut {
pos: builtin<"position">
uv: location<0, vec2>
}
@vertex
export function vs(i: builtin<"vertex_index">): VsOut {
return { pos: vec4(0., 0., 0., 1.), uv: vec2(0., 0.) }
}
@fragment
export function fs(uv: location<1, 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. A class with no fields is accepted; this code covers an invalid field declaration, an empty struct that is not a class, an @align on a field, which is not applied, and a user-defined value whose uses give it two locations (Rule 6.6).

Source

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

Edit this page Report a problem