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

IDE0007 reported for stackalloc to Span<T> #22768

Closed
sharwell opened this issue Oct 19, 2017 · 7 comments
Closed

IDE0007 reported for stackalloc to Span<T> #22768

sharwell opened this issue Oct 19, 2017 · 7 comments
Assignees
Labels
Area-IDE Bug New Language Feature - Readonly References Readonly References Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented
Milestone

Comments

@sharwell
Copy link
Member

Version Used: 15.5 Preview 1

Steps to Reproduce:

Span<int> span = stackalloc int[3];

Expected Behavior:

IDE0007 is not reported, because a change to use var also changes the type of span.

Actual Behavior:

IDE0007 is reported, and the code fix causes the code to break.

@sharwell sharwell added Area-IDE Bug help wanted The issue is "up for grabs" - add a comment if you are interested in working on it New Language Feature - Readonly References Readonly References labels Oct 19, 2017
@jcouv
Copy link
Member

jcouv commented Oct 19, 2017

FYI @OmarTawfik

@jcouv
Copy link
Member

jcouv commented Oct 19, 2017

Relates to #22411 (warn for use of stackalloc in var local).

@sharwell
Copy link
Member Author

It's similar, but this one appears to be a bug in the diagnostic analyzer not the compiler.

@jcouv
Copy link
Member

jcouv commented Oct 19, 2017

#22411 would be primarily an analyzer and codefix too. We might add a compiler warning later on top of that.

@OmarTawfik
Copy link
Contributor

@jcouv are you planning to work on this one? I can take it otherwise.

@jcouv
Copy link
Member

jcouv commented Oct 19, 2017

Go for it!

@OmarTawfik OmarTawfik self-assigned this Oct 19, 2017
@OmarTawfik OmarTawfik added this to the 15.later milestone Oct 19, 2017
@OmarTawfik OmarTawfik removed the help wanted The issue is "up for grabs" - add a comment if you are interested in working on it label Oct 19, 2017
@sharwell
Copy link
Member Author

@jinujoseph Should we bring this into 15.5 since it impacts usability of one of the key new features of the release?

@jinujoseph jinujoseph modified the milestones: 15.6, 15.5 Nov 3, 2017
@jinujoseph jinujoseph added the 4 - In Review A fix for the issue is submitted for review. label Nov 3, 2017
@sharwell sharwell added Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented and removed 4 - In Review A fix for the issue is submitted for review. labels Nov 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Bug New Language Feature - Readonly References Readonly References Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented
Projects
None yet
Development

No branches or pull requests

4 participants