-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Writing code to call a function using identifiers that don’t exist yet. #33667
Comments
I actually do not think that the previous behavior was better than the new one. @CyrusNajmabadi , what do you think? |
Sorry, i'm confused by your repro. Can you clarify things like: I now enter a variable name name Do you mean you're entering the characters Please udpate the OP and let me know when it's done. I want to experiment with the correct repro steps myself once that is done. |
Sorry, @CyrusNajmabadi ! |
"Please type "na" and space in $$. The user expects "name" and this happens in VS 15.9. Currently both completions (old and new) add a colon "name:"." if the user wanted "name" why did they write |
Note: i believe this has been the behavior ever since we added |
for example, i do this all the time:
I know that this will select and insert |
Thank you, @CyrusNajmabadi !
|
I believe so. But we should check. IIRC, we've had this behavior since forever. However, if we haven't we should try to preserve whatever we've been doing since like VS2010 onwards. |
@CyrusNajmabadi , sorry! I'm not sure I understand you. There is a change between 15.9 and 16.0. I typed |
@ivanbasov The colon should not be completed for these entries unless the commit character is |
@sharwell , why? VS does not know about the variable you may going to add in the future. However, it knows that there is a parameter with the corresponding name. Why should not it suggest the whole |
I have been hitting this frequently while trying to work in 16.0, where it inserts a |
See #32204 |
Yeah sorry for any previous confusion. My overall position is: don't change behavior here. We're already taking on a huge change just having a new completion infrastructure. let's try to keep behavior as consistent as possible. In the future, if we strongly feel like it's worthwhile, we can take targetted behavior changes if appropriate. But that should happen once all of completion has stabilized again. |
I still hit this all the time. |
Design review conclusion: To avoid muscle memory regressions, async completion in 16.x should be following the same behavior that 15.9 and earlier did for this scenario. |
reported at DC |
…initialization-exceptions dotnet#33667 Improve reporting of exceptions in service initialization
Source: Scenario 1 at https://developercommunity.visualstudio.com/content/problem/465732/vs-2019-preview-3-intellisense-auto-selecting-para.html
Writing code to call a function using identifiers that don’t exist yet.
In this scenario I’ve just put the comma in the call to new MyService in Main. I now enter a variable name name that doesn’t exist yet. As soon as you hit space or a dot (because this is an object) then IS autocompletes to the name: parameter name. This isn’t what I wanted so I have to stop my typing, go back and correct to the variable (I haven’t defined yet) and then continue typing. In VS 2017 it doesn’t autocomplete to the parameter name. It does recognize that the parameter name is the best choice, it just doesn’t auto complete it.
Expected by user
var mySvc = new MyService(10, otherSvc, name);
Actual
var mySvc = new MyService(10, otherSvc, name:);
The behavior is the same with the old completion and the new completion. It seems it is caused by #26764
The text was updated successfully, but these errors were encountered: