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

C# - Autocompletion suggestion has immediate errors #3550

Open
4 of 17 tasks
philipmat opened this issue May 10, 2024 · 0 comments
Open
4 of 17 tasks

C# - Autocompletion suggestion has immediate errors #3550

philipmat opened this issue May 10, 2024 · 0 comments
Labels
Area-Language Services IntelliSense, LSP, and related bug Something isn't working

Comments

@philipmat
Copy link

Describe the bug

in "csharp - C# Script" the auto-completions suggestions are causing immediate errors.
For example, in the screenshots/code below, the variables are of type IPagedList<T> : IList<T>.

Auto-completion suggests Select<> as a method.
Screenshot 2024-05-10 at 8 58 21 PM

Using that, completing the expression, and filling in the type yields errors:

'IPagedList' does not contain a definition for 'Select' and no accessible extension method 'Select' accepting a first argument of type 'IPagedList' could be found (are you missing a using directive or an assembly reference?)

Screenshot 2024-05-10 at 8 58 43 PM

Except it should because System.Linq is part of the usings, and the simpler/type-inferred Select() method works just fine.

Screenshot 2024-05-10 at 9 09 41 PM

Or rather: why is Autocomplete suggesting something that wouldn't work?

Please complete the following:

Which version of .NET Interactive are you using? (In a notebook, run the #!about magic command. ):

.NET Interactive
© 2020 Microsoft Corporation
Version: 1.0.522904+cdfa48b2ea1a27dfe0f545c42a34fd3ec7119074
Library version: 1.0.0-beta.24229.4+cdfa48b2ea1a27dfe0f545c42a34fd3ec7119074
Build date: 2024-05-03T08:36:36.1584577Z
https://github.com/dotnet/interactive

  • OS
    • Windows 11
    • Windows 10
    • macOS
    • Linux (Please specify distro)
    • iOS
    • Android
  • Browser
    • Chrome
    • Edge
    • Firefox
    • Safari
  • Frontend
    • Jupyter Notebook
    • Jupyter Lab
    • nteract
    • Visual Studio Code
    • Visual Studio Code Insiders
    • Visual Studio
    • Other (please specify)

Screenshots

If applicable, add screenshots to help explain your problem.

@jonsequitur jonsequitur added bug Something isn't working Area-Language Services IntelliSense, LSP, and related labels May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Language Services IntelliSense, LSP, and related bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants