---
generated: true
model: claude-opus-4-8
generated_at: 2026-07-02T00:00:00+00:00
source_commit: 8e2a63cbf22c85332796702fd02a875466486a23
watched_paths_digest: b710b32cbdf2abb7d102772d3e742f9c8a66b4aa33424fc02ec1f63cfde5b5ae
source_doc: docs/generated/design/ast-reference/declarations.md
source_doc_digest: b7d08bcc51c3f918cd55b8863cd5806c912f1e3ef965ff48b63e3f3d1c318bdc
warning: "Auto-generated. May drift from source. Do not edit by hand."
---

# Tests for ast-reference/declarations

## Intent

Tests verify the documented user-observable roles of the concrete
`Decl` / `DeclBase` subclasses enumerated in
[`docs/generated/design/ast-reference/declarations.md`](../../../design/ast-reference/declarations.md):
`VarDecl`, `LetDecl`, `ParamDecl`, `StructDecl`, `ClassDecl`,
`EnumDecl`, `EnumCaseDecl`, `InterfaceDecl`, `InheritanceDecl`,
`ExtensionDecl`, `TypeDefDecl`, `TypeAliasDecl`, `NamespaceDecl`,
`FuncDecl`, `ConstructorDecl`, `SubscriptDecl`, `PropertyDecl` and the
`AccessorDecl` family (`GetterDecl`, `SetterDecl`, `RefAccessorDecl`),
`GenericDecl`, `GenericTypeParamDecl`, `GenericValueParamDecl`,
`GenericTypeConstraintDecl`, `AssocTypeDecl`, `ImportDecl`,
`UsingDecl`, `EmptyDecl`, `DeclGroup`, `LambdaDecl`, and
`RequireCapabilityDecl`.

The doc is fundamentally about the internal AST shape of these
classes; the user-observable surface is much smaller than the catalog
of fields. Each test therefore picks one declaration kind and writes
the smallest piece of Slang that exercises that kind's documented
role, with overload resolution, type-checking, interface dispatch, or
diagnostic emission as the observable. The primary directive is
`INTERPRET` (pre-backend claims resolved before codegen); a handful of
emit-observable claims (struct type shape, `ref` accessor lowering)
fan out to `hlsl` / `glsl` / `cuda` / `metal` / `wgsl` text targets.
Negative diagnostic tests cover the declaration-level rejections the
documented role implies (`let` immutability, missing interface
requirement, wrong constructor arity, generic constraint violation,
undeclared name, unknown module, bad capability name).

Internal AST shape claims (parent class in the C++ hierarchy, private
field names, FIDDLE tag, ASTBuilder allocation, synthesized-only
classes that have no user spelling) are recorded under
`## Untested claims` because they are unobservable through any allowed
`slang-test` directive.

## Functional coverage

| Claim                                                                                                                                                         | Intent     | Anchor                                                                                                                                              | Tests                                                                                                  |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| A PropertyDecl holds GetterDecl/SetterDecl children; reading and writing the property fires the respective accessor.                                          | functional | [#accessordecl-family](../../../design/ast-reference/declarations.md#accessordecl-family)                                                           | [`propertydecl-getter-setter.slang`](propertydecl-getter-setter.slang)                                 |
| A RefAccessorDecl is emitted by the HLSL backend as a return-by-reference helper; the ref accessor's body appears in the emitted text.                        | functional, expansion | [#accessordecl-family](../../../design/ast-reference/declarations.md#accessordecl-family)                                                | [`refaccessor-property.slang`](refaccessor-property.slang), [`refaccessor-property-glsl.slang`](refaccessor-property-glsl.slang), [`refaccessor-property-wgsl.slang`](refaccessor-property-wgsl.slang) |
| A ClassDecl declares a reference-type aggregate; two variables can refer to the same instance and one's mutation is visible through the other.                | functional | [#aggtypedecl-structdecl-classdecl-enumdecl](../../../design/ast-reference/declarations.md#aggtypedecl-structdecl-classdecl-enumdecl)               | [`classdecl-reference-type.slang`](classdecl-reference-type.slang)                                     |
| A StructDecl can nest another StructDecl as a member; the nested type is reachable through dotted member access.                                              | functional | [#aggtypedecl-structdecl-classdecl-enumdecl](../../../design/ast-reference/declarations.md#aggtypedecl-structdecl-classdecl-enumdecl)               | [`structdecl-nested-struct.slang`](structdecl-nested-struct.slang)                                     |
| A StructDecl declares a value-type aggregate; assigning a struct copies it so the original is unchanged.                                                      | functional | [#aggtypedecl-structdecl-classdecl-enumdecl](../../../design/ast-reference/declarations.md#aggtypedecl-structdecl-classdecl-enumdecl)               | [`structdecl-value-type.slang`](structdecl-value-type.slang)                                           |
| A StructDecl is emitted as a struct type by each text-emit backend; the struct keyword and field names appear in the output.                                  | functional, expansion | [#aggtypedecl-structdecl-classdecl-enumdecl](../../../design/ast-reference/declarations.md#aggtypedecl-structdecl-classdecl-enumdecl)    | [`structdecl-emit-multitarget.slang`](structdecl-emit-multitarget.slang), [`structdecl-emit-metal.slang`](structdecl-emit-metal.slang), [`structdecl-emit-wgsl.slang`](structdecl-emit-wgsl.slang) |
| An EnumCaseDecl carries the case's tag value; cases compare equal to the integer they were declared with.                                                     | functional | [#enumdecl-and-enumcasedecl](../../../design/ast-reference/declarations.md#enumdecl-and-enumcasedecl)                                               | [`enumcasedecl-tag-value.slang`](enumcasedecl-tag-value.slang)                                         |
| An EnumDecl declares a tagged-union enum and each EnumCaseDecl is one named case; case selection picks the appropriate branch.                                | functional | [#enumdecl-and-enumcasedecl](../../../design/ast-reference/declarations.md#enumdecl-and-enumcasedecl)                                               | [`enumdecl-tagged-union.slang`](enumdecl-tagged-union.slang)                                           |
| An EnumDecl is treated as an AggTypeDecl so enum types can have conformances; an interface-constrained generic accepts an enum value.                         | functional | [#enumdecl-and-enumcasedecl](../../../design/ast-reference/declarations.md#enumdecl-and-enumcasedecl)                                               | [`enumdecl-conformance.slang`](enumdecl-conformance.slang)                                             |
| An ExtensionDecl attaches new members to an existing type; the added member is callable on values of that type.                                               | functional | [#extensiondecl](../../../design/ast-reference/declarations.md#extensiondecl)                                                                       | [`extensiondecl-adds-member.slang`](extensiondecl-adds-member.slang)                                   |
| An ExtensionDecl can add interface conformance to an existing type; the type then dispatches through the interface.                                           | functional | [#extensiondecl](../../../design/ast-reference/declarations.md#extensiondecl)                                                                       | [`extensiondecl-adds-interface-conformance.slang`](extensiondecl-adds-interface-conformance.slang)     |
| A GenericDecl wraps an inner decl with a parameter list; the same inner decl specializes differently at distinct type arguments.                              | functional | [#genericdecl](../../../design/ast-reference/declarations.md#genericdecl)                                                                           | [`genericdecl-wrapper.slang`](genericdecl-wrapper.slang)                                               |
| A single GenericDecl can be specialized with different value/type substitutions per call site; each specialization is independent.                            | functional | [#genericdecl](../../../design/ast-reference/declarations.md#genericdecl)                                                                           | [`genericdecl-different-substitutions.slang`](genericdecl-different-substitutions.slang)               |
| Two GenericDecls can compose: a generic struct field of a generic struct specializes when the outer specializes.                                              | functional | [#genericdecl](../../../design/ast-reference/declarations.md#genericdecl)                                                                           | [`genericdecl-recursive.slang`](genericdecl-recursive.slang)                                           |
| An InheritanceDecl carries a witness table after checking; an interface default method is reachable through the conforming type.                              | functional | [#inheritancedecl](../../../design/ast-reference/declarations.md#inheritancedecl)                                                                   | [`inheritancedecl-base-interface-method.slang`](inheritancedecl-base-interface-method.slang)           |
| An InterfaceDecl declares an interface and InheritanceDecl ties a conforming type to it; interface-typed dispatch picks the conforming type's implementation. | functional | [#inheritancedecl](../../../design/ast-reference/declarations.md#inheritancedecl)                                                                   | [`interfacedecl-and-inheritance.slang`](interfacedecl-and-inheritance.slang)                           |
| A NamespaceDecl introduces a named scope; members are reached with the namespace-qualified name.                                                              | functional | [#namespacedecl-moduledecl-filedecl](../../../design/ast-reference/declarations.md#namespacedecl-moduledecl-filedecl)                               | [`namespacedecl-qualified-lookup.slang`](namespacedecl-qualified-lookup.slang)                         |
| Multiple textual namespace declarations with the same name in one module are collapsed into one NamespaceDecl during parsing.                                 | functional | [#namespacedecl-moduledecl-filedecl](../../../design/ast-reference/declarations.md#namespacedecl-moduledecl-filedecl)                               | [`namespacedecl-same-name-collapse.slang`](namespacedecl-same-name-collapse.slang)                     |
| A ConstructorDecl is a \_\_init declaration; calling the type as a function dispatches to the constructor and initializes the struct.                         | functional | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`constructordecl-init.slang`](constructordecl-init.slang)                                             |
| A ConstructorDecl's signature is part of the type's API; calling the constructor with the wrong arity is diagnosed.                                           | negative   | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`constructordecl-wrong-arity-rejected.slang`](constructordecl-wrong-arity-rejected.slang)             |
| A DeclGroup wraps multiple declarations parsed as one group (int a, b;); each name is independently visible.                                                  | functional | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`declgroup-multi-var.slang`](declgroup-multi-var.slang)                                               |
| A FuncDecl declared as a struct member becomes a method; calling the method dispatches through the receiver.                                                  | functional | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`funcdecl-member-method.slang`](funcdecl-member-method.slang)                                         |
| A FuncDecl is an ordinary function declaration; two FuncDecls with the same name but different parameter types overload independently.                        | functional | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`funcdecl-and-overload.slang`](funcdecl-and-overload.slang)                                           |
| A FuncDecl supports the modern function form `func name(...) -> T`; the arrow-return spelling produces the same callable as the C-style spelling.             | functional | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`funcdecl-trailing-arrow-return.slang`](funcdecl-trailing-arrow-return.slang)                         |
| A GenericTypeConstraintDecl is enforced at the call site; specializing with a type that does not satisfy the constraint is diagnosed.                         | negative   | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`generic-constraint-violation-rejected.slang`](generic-constraint-violation-rejected.slang)           |
| A GenericTypeConstraintDecl records a constraint (T : I); a satisfying type argument compiles and the dispatch reaches the conforming member.                 | functional | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`generic-type-constraint.slang`](generic-type-constraint.slang)                                       |
| A GenericTypeParamDecl introduces a type parameter; the inner decl uses the parameter as a type and is specialized when called.                               | functional | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`generic-type-param.slang`](generic-type-param.slang)                                                 |
| A GenericValueParamDecl introduces a value parameter on a GenericDecl; the inner decl uses the value as a compile-time integer.                               | functional | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`generic-value-param.slang`](generic-value-param.slang)                                               |
| A LambdaDecl is the closure-struct produced by a lambda expression; the closure is callable through the IFunc-constrained generic helper.                     | functional | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`lambdadecl-closure.slang`](lambdadecl-closure.slang)                                                 |
| A LetDecl is a let variable; immutable. Assignment through a let-bound name is rejected.                                                                      | negative   | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`letdecl-immutable.slang`](letdecl-immutable.slang)                                                   |
| A ParamDecl is a function parameter; in/out/inout direction qualifiers govern whether the callee's mutation is visible at the caller.                         | functional | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`paramdecl-in-out-inout.slang`](paramdecl-in-out-inout.slang)                                         |
| A RequireCapabilityDecl is a module-level declaration that states a capability requirement; the module compiles when the target capability is met.            | functional | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`requirecapabilitydecl.slang`](requirecapabilitydecl.slang)                                           |
| A RequireCapabilityDecl with a non-existent capability name is diagnosed; the decl carries through to capability resolution.                                  | negative   | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`requirecapabilitydecl-bad-name-rejected.slang`](requirecapabilitydecl-bad-name-rejected.slang)       |
| A SubscriptDecl makes the type indexable; a[i] invokes the subscript's get accessor.                                                                          | functional | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`subscriptdecl-get.slang`](subscriptdecl-get.slang)                                                   |
| A TypeAliasDecl introduces a modern-syntax alias (typealias Y = X) for an existing type; the alias is interchangeable with the original.                      | functional | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`typealiasdecl.slang`](typealiasdecl.slang)                                                           |
| A TypeDefDecl introduces a typedef-style name for an existing type; the alias is usable wherever the original type would be.                                  | functional | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`typedefdecl.slang`](typedefdecl.slang)                                                               |
| A UsingDecl brings names from another scope into the current one; an unqualified use of the imported name resolves.                                           | functional | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`usingdecl-brings-name.slang`](usingdecl-brings-name.slang)                                           |
| A VarDecl is an ordinary mutable variable; its value can be assigned and re-read.                                                                             | functional | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`vardecl-mutable.slang`](vardecl-mutable.slang)                                                       |
| A VarDecl with an initExpr (Expr\* initializer) populates the variable's storage with the initializer's value.                                                | functional | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`structdecl-default-init.slang`](structdecl-default-init.slang)                                       |
| A reference to a name with no matching Decl in scope is diagnosed; no synthetic UnresolvedDecl reaches the user.                                              | negative   | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`declref-undeclared-name-rejected.slang`](declref-undeclared-name-rejected.slang)                     |
| A struct with no user \_\_init still has a synthesized member-init constructor; positional-initializer syntax fills fields in declaration order.              | functional | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`constructordecl-synthesized-member-init.slang`](constructordecl-synthesized-member-init.slang)       |
| An AssocTypeDecl declares an associated type in an interface; the conforming type supplies a concrete typealias and dispatch produces that type's value.      | functional | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`assoctypedecl-interface.slang`](assoctypedecl-interface.slang)                                       |
| An EmptyDecl is a declaration that exists only to carry modifiers; a bare semicolon at module scope is accepted.                                              | functional | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`emptydecl-bare-semicolon.slang`](emptydecl-bare-semicolon.slang)                                     |
| An ImportDecl makes the declarations of another module visible in the current scope; importing glsl makes its names usable.                                   | functional | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`importdecl-glsl.slang`](importdecl-glsl.slang)                                                       |
| An ImportDecl that names a module that cannot be found is diagnosed at parse/check time.                                                                      | negative   | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                                                       | [`importdecl-unknown-module-rejected.slang`](importdecl-unknown-module-rejected.slang)                 |
| An interface requirement is whatever Decl is written inside the interface body; a conforming type that omits a required member is diagnosed.                  | negative   | [#requirementdecl-style-nodes-inside-interfacedecl](../../../design/ast-reference/declarations.md#requirementdecl-style-nodes-inside-interfacedecl) | [`interfacedecl-missing-requirement-rejected.slang`](interfacedecl-missing-requirement-rejected.slang) |

## Untested claims

| Claim                                                                                                                                                                                                                                                                                                                     | Reason                  | Anchor                                                                                                       | Why untested                                                                                                                                                                             |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `AttributeDecl::syntaxClass` records the attribute class an `[name(args)]` binds to. An attribute's *effect* is observable, but the C++ class identity of the AttributeDecl node is not reachable through any text I/O.                                                                                                      | internal-source-fact    | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                 | The claim is about the reflection handle stored in the node; no `slang-test` directive reveals the class identity. Attribute effects are covered by modifier/attribute tests elsewhere. |
| The `## Family hierarchy` mermaid diagram as a graph: abstract intermediates (`ContainerDecl`, `CallableDecl`, `AggTypeDeclBase`, `FunctionDeclBase`, `VarDeclBase`, `SimpleTypeDecl`, `TypeConstraintDecl`, `NamespaceDeclBase`, `GenericTypeParamDeclBase`, `FileReferenceDeclBase`, `IncludeDeclBase`).                   | internal-source-fact    | [#family-hierarchy](../../../design/ast-reference/declarations.md#family-hierarchy)                          | These abstract bases carry no FIDDLE concrete tag and produce no user spelling; the graph shape is a C++ inheritance fact with no test-directive surface.                               |
| `EmptyDecl`'s `layout(...) in;` GLSL form: the doc cites GLSL-specific syntax as the motivating example. This bundle exercises the simpler bare-`;` form the parser also produces an `EmptyDecl` for.                                                                                                                       | out-of-bundle           | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                 | The GLSL `layout(...) in;` global-layout spelling is a GLSL emit-side surface; the bare-`;` EmptyDecl is tested here and the GLSL variant belongs to a GLSL-emit bundle.                 |
| `FuncAliasDecl` "function alias / re-export of an existing callable". No user spelling accepts a `func alias = original;` form; the node is checker-synthesized (see Doc gaps observed).                                                                                                                                    | internal-source-fact    | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                 | The doc's grammar pointer does not correspond to accepted surface syntax; the node arises only from checker desugaring (e.g. differentiation), so there is nothing to spell in a test.  |
| `GLSLInterfaceBlockDecl` "GLSL-style interface block (uniform/buffer/in/out)".                                                                                                                                                                                                                                             | gpu-non-compute         | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                 | The observable surface is GLSL interface blocks on a graphics stage; the interpreter cannot model them. A GLSL emit test on a vertex/fragment stage would verify it.                    |
| `FuncExtensionDecl` (`__func_extension fwd_diff(foo)(...)`) attaches a custom derivative to an existing function.                                                                                                                                                                                                          | needs-cli-test          | [#funcextensiondecl](../../../design/ast-reference/declarations.md#funcextensiondecl)                        | Gated behind `-experimental-feature`; verifying the shorthand requires driving `slangc` with that flag and inspecting differentiation output, outside a plain `//TEST` directive.       |
| `IncludeDecl` / `ImplementingDecl` (`__include` / `__implementing`) reference companion source files.                                                                                                                                                                                                                     | needs-multi-file-test   | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                 | Observable only across 2+ `.slang` files composing one module; the single-file `slang-test` surface this bundle uses cannot host the companion file.                                    |
| `ModuleDeclarationDecl` (the `module M;` opener) names the module of the current file.                                                                                                                                                                                                                                     | needs-multi-file-test   | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                 | Meaningful only when several files compose into one named module; requires a multi-file test harness rather than a single-file interpreter run.                                         |
| `GlobalGenericParamDecl` / `GlobalGenericValueParamDecl` (module-level `type_param` / existential value parameter).                                                                                                                                                                                                        | needs-cli-test          | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                 | Module-level existential parameters are supplied through the compilation API / specialization arguments, not through a self-contained interpreted `main`.                               |
| The `SyntaxDecl` "keyword binding produced by `__syntax`" model.                                                                                                                                                                                                                                                          | out-of-bundle           | [#syntaxdecl-and-the-syntax-as-declaration-model](../../../design/ast-reference/declarations.md#syntaxdecl-and-the-syntax-as-declaration-model) | Keyword recognition is exercised from the surface side by `syntax-reference/keywords-and-builtins/`; the AST-shape claim (keyword maps to a parse callback) has no separate observable. |
| Synthesized-only concrete classes with no user spelling: `SynthesizedStructDecl`, `SynthesizedFuncDecl`, `UnresolvedDecl`, `InterfaceDefaultImplDecl`, `ThisTypeDecl`, `ThisTypeConstraintDecl`.                                                                                                                            | internal-source-fact    | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                 | Created by the checker/deserializer, not user code; their existence shows up only through the surrounding feature (interface dispatch, tuples, default-impl), which is what we test.    |
| The `where`-clause constraint variants beyond `T : I`: `TypeCoercionConstraintDecl`, `NonEmptyPackConstraintDecl`, `GenericVariadicPackCountConstraintDecl`, `HasDiffTypeInfoConstraintDecl`.                                                                                                                               | out-of-bundle           | [#generictypeconstraintdecl-as-an-interface-requirement](../../../design/ast-reference/declarations.md#generictypeconstraintdecl-as-an-interface-requirement) | These specialized constraint forms (pack-count, coercion, differentiable) are exercised by the generics / variadic / autodiff bundles; this bundle covers the `T : I` form.            |
| Field names listed in the `## Nodes` table (`VarDecl::type: TypeExp`, `VarDecl::initExpr: Expr*`, `GenericDecl::inner: Decl*`, `ExtensionDecl::targetType: TypeExp`, `EnumCaseDecl::tagVal: IntVal*`, `InheritanceDecl::witnessTable`, `ConstructorDecl::m_flavor`, `LambdaDecl::funcDecl`, `ModuleDecl::module: Module*`). | internal-source-fact    | [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                 | Implementation detail (which C++ field stores what) with no user-observable consequence distinct from the behavior already tested.                                                      |
| The C++ parent class of any concrete `Decl` (e.g. `LetDecl` extends `VarDecl`, `ConstructorDecl` extends `FunctionDeclBase`, `GenericTypeParamDecl` extends `GenericTypeParamDeclBase`).                                                                                                                                    | internal-source-fact    | [#family-hierarchy](../../../design/ast-reference/declarations.md#family-hierarchy)                          | Only the user-observable behavior of each concrete decl is testable; the C++ hierarchy edge is not.                                                                                     |
| The grammar-production a parser callback is named for (e.g. `parseAggTypeDecl`, `parseRequireCapabilityDecl`, `parseGenericDecl`, `parseInterfaceConstraintDecl`).                                                                                                                                                          | internal-source-fact    | [#source](../../../design/ast-reference/declarations.md#source)                                              | Parser-callback names are an implementation fact with no user-observable consequence.                                                                                                   |

## Doc gaps observed

| Anchor                                                                                                             | Kind                  | Gap                                                                                                                                                                                                                                                                                                                             | Suggested addition                                                                                                                    |
| ------------------------------------------------------------------------------------------------------------------ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                      | drift-from-source     | The `## Nodes` row for `FuncAliasDecl` links to a `[func alias]` grammar production, implying a user spelling. In practice `slangc` accepts no `func aliasedName = original;` form; the node is synthesized by the checker (e.g. for differentiation re-exports).                                                                | Remove the grammar link on the `FuncAliasDecl` row, or add a note that `FuncAliasDecl` is checker-synthesized and has no user syntax. |
| [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                      | missing-surface       | The rows for `SynthesizedStructDecl`, `SynthesizedFuncDecl`, `InterfaceDefaultImplDecl`, `ThisTypeDecl`, `ThisTypeConstraintDecl`, and `UnresolvedDecl` list `(none)` in the Grammar column but do not say explicitly that they have no user spelling and no distinct externally observable behavior.                            | Add a one-line "synthesized by the checker / deserializer; no user spelling" note to each so an agent can skip them without doubt.    |
| [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                      | ambiguous-claim       | The doc names `ModernParamDecl` ("modern-syntax parameter; immutable unless `out`/`inout`") but does not state which parameter *spelling* produces `ModernParamDecl` versus `ParamDecl`. A reader cannot write a test that distinguishes them.                                                                                   | Add a pointer to the modern parameter grammar and a one-line example of the spelling that yields `ModernParamDecl`.                    |
| [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                      | undocumented-behavior | The `EnumDecl` row mentions `tagType: Type*` (the underlying integer type) but states no user-facing claim about how the tag type affects, e.g., an `int(caseValue)` conversion or a custom `: uint8_t` base. The tag-value test here uses the default tag type only.                                                            | Add a claim describing the observable effect of the enum's tag type (conversion width, explicit `: <intType>` base) with an example.  |
| [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                      | undocumented-behavior | The `RequireCapabilityDecl` row says only "expressed as a decl so it can be exported"; it does not state the observable diagnostic when the named capability does not exist. The negative test here anchors to the general `## Nodes` row rather than a specific claim.                                                          | Add a one-line claim that an unknown capability name is diagnosed, so the negative test can anchor to it directly.                    |
| [#nodes](../../../design/ast-reference/declarations.md#nodes)                                                      | missing-example       | The `GLSLInterfaceBlockDecl` row ("GLSL-style interface block (uniform/buffer/in/out)") gives no minimal example and no note that the surface is GLSL-emit-only, so a reader cannot tell where the behavior is observable.                                                                                                       | Add a minimal GLSL interface-block example and a note that it is observable only on the GLSL emit path (a graphics stage).            |
