{"record":{"id":"aeb08132e430f89b","repo":"stride3d/stride","slug":"unknown-accessor-accessor-on-type-currentvaluetype-in","errorCode":null,"errorMessage":"unknown accessor {accessor} on type {currentValueType} in expression {this}","messagePattern":"unknown accessor (.+?) on type (.+?) in expression (.+?)","errorType":"exception","errorClass":"NotImplementedException","httpStatus":null,"severity":"error","filePath":"sources/shaders/Stride.Shaders.Parsers/Parsing/SDSL/AST/Expression.cs","lineNumber":1470,"sourceCode":"                        // This is what this chain return (value before modification)\n                        result = builder.AsValue(context, result);\n\n                        // Use integer so that it gets converted to proper type according to expression type\n                        var constant1 = context.CompileConstant(1);\n                        var modifiedValue = builder.BinaryOperation(table, context, result, postfix.Operator switch\n                        {\n                            Operator.Inc => Operator.Plus,\n                            Operator.Dec => Operator.Minus,\n                            _ => throw new NotSupportedException($\"Unsupported postfix operator {postfix.Operator}\"),\n                        }, constant1, Info);\n\n                        // We store the modified value back in the variable\n                        builder.Insert(new OpStore(resultPointer.Id, modifiedValue.Id, null, []));\n\n                        break;\n                    }\n                default:\n                    throw new NotImplementedException($\"unknown accessor {accessor} on type {currentValueType} in expression {this}\");\n            }\n\n            currentValueType = accessor.Type!;\n            // only if OpAccessChain is emitted (otherwise there is no value)\n            if (compiler != null && accessChainIdCount == 0)\n                intermediateValues![1 + i] = result;\n        }\n\n        if (compiler != null)\n            EmitOpAccessChain(accessChainIds, Accessors.Count - 1);\n\n        Type = currentValueType;\n\n        return result;\n    }\n\n    private void TextureGenerateImageOperands(SpirvValue? lod, SpirvValue? offset, SpirvValue? sampleIndex, out ImageOperandsMask imask, out EnumerantParameters imParams)\n    {","sourceCodeStart":1452,"sourceCodeEnd":1488,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/shaders/Stride.Shaders.Parsers/Parsing/SDSL/AST/Expression.cs#L1452-L1488","documentation":"The default arm of the accessor-kind switch in the SPIR-V expression compiler. When an accessor (indexer/member/swizzle/postfix already handled) falls through with an unrecognized Accessor subtype on a given currentValueType, this NotImplementedException fires at Expression.cs:1470, including the accessor, type, and full expression in the message.","triggerScenarios":"An Accessor kind other than Indexer/Swizzle/Member/PostFix (or a kind/type combination not covered by the earlier cases) is processed by CompileImpl — only reachable via new accessor types or hand-built ASTs.","commonSituations":"Encountered while extending the SDSL AST with a new accessor kind that wasn't added to the compiler switch, or after deserializing an AST produced by a different compiler version.","solutions":["Identify the accessor kind from the message and add a corresponding case to the switch before `default` in Expression.cs.","Check whether the AST was produced by a mismatched parser version; regenerate it with the matching Stride.Shaders version.","If the expression itself is wrong, rewrite the shader expression using supported accessors (indexing, member access, swizzle, ++/--)."],"exampleFix":"// before\ndefault: throw new NotImplementedException(...);\n// after\ncase NewAccessorKind na: /* compile it */ break;\ndefault: throw new NotImplementedException(...);","handlingStrategy":"try-catch","validationCode":"// assert every accessor kind is handled before compiling\nif (accessor is not (Indexer or Swizzle or Member or PostFix))\n    throw new ShaderCompileHint($\"Unhandled accessor {accessor.GetType().Name}\");","typeGuard":"static bool IsHandledAccessor(Accessor a) => a is Indexer or Swizzle or Member or PostFix;","tryCatchPattern":"try { result = CompileExpression(expr, table, compiler); }\ncatch (NotImplementedException ex) when (ex.Message.StartsWith(\"unknown accessor\"))\n{ diagnostics.Report(expr.Info, ex.Message); }","preventionTips":["Update the compiler switch whenever a new Accessor subclass is added to the AST.","Avoid hand-building or deserializing ASTs across different compiler versions.","Add an exhaustive switch / exhaustive-match test over all accessor kinds."],"tags":["shader","spirv","compiler","not-implemented"],"backgroundTag":"method-not-implemented","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}