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

Empty model definitions crash the source generator #71

Open
erri120 opened this issue Jul 3, 2024 · 0 comments
Open

Empty model definitions crash the source generator #71

erri120 opened this issue Jul 3, 2024 · 0 comments

Comments

@erri120
Copy link
Member

erri120 commented Jul 3, 2024

public partial class Foo : IModelDefinition { }

Will crash the source generator, but should probably just create a diagnostic:

3>CSC: Warning CS8785 : Generator 'ModelGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'ArgumentOutOfRangeException' with message 'Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant