Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CS7038: Failed to emit module if new collection syntax is used with an implicit ImmutableArray operator. #74185

Closed
korsarNek opened this issue Jun 27, 2024 · 0 comments · Fixed by #74251

Comments

@korsarNek
Copy link

Version Used:
.Net 8.0.302, also occurs with 8.0.301, I haven't tested other versions.

Steps to Reproduce:

sharplab

The error occurs locally with .Net 8.0.302 of the sdk and on sharplab with main (11 Jun 2024), if I choose "Default", the error becomes CS1061 instead of CS7038

Diagnostic Id: CS7038: Failed to emit module

Expected Behavior: CS1061

Actual Behavior: Outputs the cryptic error CS7038: Failed to emit module

The code is based on the omnisharp container, that's where I encountered the error. I reduced it to the minimal version where I was still able to get the error, the implicit operator from ImmutableArray seems to be important for this. The original container class has a bunch of other operators, but they don't seem related to the error.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Jun 27, 2024
@korsarNek korsarNek changed the title CS7038: Failed to emit module in most recent version if new collection syntax is used but not supported. CS7038: Failed to emit module if new collection syntax is used with an implicit ImmutableArray operator. Jun 27, 2024
@jaredpar jaredpar added Bug New Feature - Collection Expressions and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants