"CS7038: Failed to emit module" when using List Pattern Matching on custom type #60090
Labels
Area-Compilers
Bug
Feature - List Patterns
Resolution-Duplicate
The described behavior is tracked in another issue
Version Used: c#11 preview, Visual Studio 2022 17.1.1, though it also happens on SharpLab.
Steps to Reproduce:
this[Index i]
function, but don't add aCount
orLength
property.I've created a SharpLab example that suffers from this issue, though it also happens locally in Visual Studio.
Expected Behavior:
A helpful error message.
Actual Behavior:
The compiler issues an unhelpful error:
Error CS7038 Failed to emit module '_': Unable to determine specific cause of the failure.
The text was updated successfully, but these errors were encountered: