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

Feature / Architecture Discussion: Ref #1151

Closed
5 of 6 tasks
siegfriedpammer opened this issue May 30, 2018 · 0 comments
Closed
5 of 6 tasks

Feature / Architecture Discussion: Ref #1151

siegfriedpammer opened this issue May 30, 2018 · 0 comments

Comments

@siegfriedpammer
Copy link
Member

siegfriedpammer commented May 30, 2018

Language Feature(s):

  • C# 7.0 ref locals / ref returns
  • C# 7.2 ref readonly
  • C# 7.2 interior pointer/Span/ref struct
  • C# 7.2 conditional ref operator
  • C# 7.3 Ref local re-assignment

TODO:

  • Add tests

These features should be implemented in one go, because they depend on each other. Some of them are already implemented partially (e.g. conditional ref and basic support for ref variables).

1) Ref locals / Ref returns

I have been unable to find a specification for this feature, but here is some info:
Scope of ref locals/parameters and returns: https://github.com/dotnet/csharplang/blob/master/proposals/csharp-7.2/span-safety.md#draft-language-specification
Roslyn test cases: http://source.roslyn.codeplex.com/#Roslyn.Compilers.CSharp.Semantic.UnitTests/Semantics/RefLocalsAndReturnsTests.cs

2) Ref readonly

Seems to be fairly well documented at https://github.com/dotnet/csharplang/blob/master/proposals/csharp-7.2/readonly-ref.md...

3) interior pointer/Span/ref struct

See https://github.com/dotnet/csharplang/blob/master/proposals/csharp-7.2/span-safety.md

4) conditional ref operator

Should already be done.

5) Ref local re-assignment

Needs syntactic adjustment, because the syntax currently used by ILSpy is invalid. See #1147.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 18, 2020
ElektroKill pushed a commit to dnSpyEx/ILSpy that referenced this issue Aug 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant