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

Warn when generic types or functions with constraints on their arguments are referenced #1065

Closed
degory opened this issue Feb 16, 2024 · 0 comments · Fixed by #1066
Closed
Labels

Comments

@degory
Copy link
Owner

degory commented Feb 16, 2024

The compiler does not currently enforce constraints on generic types, and incorrect and unsafe IL will be generated if constraints are not respected (see #115).

As a stopgap, while a complete implementation of constraint enforcement is being implemented, the user should at least be warned if code references a type or method with constraints, so they can work around the issue safely.

@degory degory added the bug label Feb 16, 2024
degory added a commit that referenced this issue Feb 16, 2024
Bugs fixed:
- Give a warning when referencing generic types or functions that have constraints on their type arguments (closes #1065)

Notes:
- This *does not* prevent generation of potentially incorrect and unsafe IL. It simply issues a warning where types or functions with type constraints are referenced. See #115 for details.
degory added a commit that referenced this issue Feb 16, 2024
Bugs fixed:
- Give a warning when referencing generic types or functions that have constraints on their type arguments (closes #1065)

Notes:
- This **does not** prevent generation of potentially incorrect and unsafe IL. It simply issues a warning where types or functions with type constraints are referenced. See #115 for details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

1 participant