Skip to content

Quick Info for extension methods should reveal nullable receiver type #38047

@sharwell

Description

@sharwell

Version Used: 16.3 Preview 2

Steps to Reproduce:

static class Extensions {
  public static string AsString(this object? data) => data?.ToString() ?? "";
}

class Example {
  void Method(object? value) {
    value.AsString(); // ← Hover over AsString
  }
}
  1. Use the above code
  2. Hover over the call to AsString

Expected Behavior:

(extension) string object?.AsString()

Actual Behavior:

(extension) string object.AsString()

Metadata

Metadata

Assignees

No one assigned

    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