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

Can't use ref struct types #1077

Open
1 of 2 tasks
degory opened this issue Feb 20, 2024 · 0 comments
Open
1 of 2 tasks

Can't use ref struct types #1077

degory opened this issue Feb 20, 2024 · 0 comments
Labels

Comments

@degory
Copy link
Owner

degory commented Feb 20, 2024

It's not possible to use ref struct types reflected from assemblies built with C#. For example we want to be able to call methods on DefaultInterpolatedStringHandler to support string interpolation.

  • Materialize correct types and symbols for reflected ref struct types so they can be used
  • Prevent values of these types from being boxed (because they should be constrained to live on the stack)

A partial fix, sufficient to support internal use for string interpolation would be not to enforce the allocate only on stack constraint and warn on use about this unchecked constraint

@degory degory added the bug label Feb 20, 2024
degory added a commit that referenced this issue Feb 20, 2024
Enhancements:
- Add initial support for string interpolation (see #1071)

Bugs fixed:
- Can't use ref struct types (partial fix only #1077)
degory added a commit that referenced this issue Feb 20, 2024
Enhancements:
- Add initial support for string interpolation (see #1071)

Bugs fixed:
- Can't use ref struct types (partial fix only #1077)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant