Skip to content

IntelliSense suggests GetType on a span, but it won't compile #35178

@cartermp

Description

@cartermp

Version Used:

  • VS 2019 16.0.1
  • C# Tools 3.0.0-beta4-19170-01+1deafee3682da88bf07d1c18521a99f47446cee8

Steps to Reproduce:

using System;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            var sp = Span<int>.Empty;
            var t = sp. // <<- Caret here
            Console.WriteLine($"Span.IsValueType: {t.IsValueType}");
        }
    }
}

Expected Behavior:

Actual Behavior:

Suggests GetType()

image

And this results in a compile error:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-IDEBugIDE-IntelliSenseCompletion, Signature Help, Quick Infohelp wantedThe issue is "up for grabs" - add a comment if you are interested in working on it

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions