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

Operators returning a readonly reference in IL #22282

Open
OmarTawfik opened this issue Sep 22, 2017 · 7 comments
Open

Operators returning a readonly reference in IL #22282

OmarTawfik opened this issue Sep 22, 2017 · 7 comments

Comments

@OmarTawfik
Copy link
Contributor

OmarTawfik commented Sep 22, 2017

Related to test plan #19216

It appears that the current version accepts operators that return by ref (when read from IL).
Should we be accepting ref-readonly returns as well? I believe we should not, since it is a spec violation.

@OmarTawfik OmarTawfik added this to the 15.5 milestone Sep 22, 2017
@OmarTawfik OmarTawfik changed the title Operators returning a readonly reference in IL Test operators returning a readonly reference in IL Sep 22, 2017
@OmarTawfik OmarTawfik changed the title Test operators returning a readonly reference in IL Operators returning a readonly reference in IL Sep 22, 2017
@OmarTawfik OmarTawfik self-assigned this Sep 22, 2017
@VSadov
Copy link
Member

VSadov commented Sep 22, 2017

Should not allow it. In the past we did not allow operators that we could not declare.

@jcouv jcouv moved this from Backlog to C# 7.2 in Compiler: Needs LDM attention Sep 22, 2017
@jcouv
Copy link
Member

jcouv commented Sep 25, 2017

From LDM today, we should not allow it in metadata, since we won't support it in the language in 7.2. This needs to be done in such a way that it could be added later.

@jcouv jcouv removed this from C# 7.2 Backlog in Compiler: Needs LDM attention Sep 25, 2017
@OmarTawfik
Copy link
Contributor Author

We should add tests to disallow using it as an operator (a + b) or directly by name (op_Addition).
Side test: are we able today to call IL ref returning operators by name from metadata?

@VSadov VSadov modified the milestones: 15.5, 15.later Sep 27, 2017
@OmarTawfik OmarTawfik removed their assignment Sep 28, 2017
@OmarTawfik
Copy link
Contributor Author

@jcouv are we ok with having this in 15.later? should it be done in 15.5?

@jcouv
Copy link
Member

jcouv commented Sep 28, 2017

From our discussion, let's keep this in 15.later for now, and go through un-assigned 15.5 ref readonly issues first.

@jaredpar jaredpar modified the milestones: 15.6, 15.7 Jan 5, 2018
@jaredpar
Copy link
Member

jaredpar commented Jan 5, 2018

Moving out to 15.7 but this is an issue we need to tackle in that release. Else we risk being forced to keep this behavior for compat reasons.

@jaredpar jaredpar modified the milestones: 15.7, 15.8 Apr 4, 2018
@jaredpar jaredpar modified the milestones: 15.8, 16.0 Jul 11, 2018
@OmarTawfik
Copy link
Contributor Author

@jaredpar doing some clean up, and apparently I cannot reassign my bugs if I'm no longer an owner here :(
Want to make sure this is not forgotten. can you please triage accordingly?

@jinujoseph jinujoseph modified the milestones: 16.0, 16.3 Jun 9, 2019
@jcouv jcouv modified the milestones: 16.3, Compiler.Next Jul 11, 2019
@jaredpar jaredpar modified the milestones: Compiler.Next, Backlog Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants