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

Event should show as non-nullable where not assignable or invokable #43773

Open
sharwell opened this issue Apr 29, 2020 · 1 comment
Open

Event should show as non-nullable where not assignable or invokable #43773

sharwell opened this issue Apr 29, 2020 · 1 comment
Labels
Area-IDE Concept-Continuous Improvement help wanted The issue is "up for grabs" - add a comment if you are interested in working on it IDE-IntelliSense Completion, Signature Help, Quick Info IntelliSense-Quick Info New Language Feature - Nullable Reference Types Nullable Reference Types
Milestone

Comments

@sharwell
Copy link
Member

Version Used: 16.6 Preview 3

Steps to Reproduce:

#nullable enable

using System;

class First
{
    public event EventHandler? Handler;
}

class Second
{
    public void Method(First first)
    {
        first.Handler += delegate { }; // ← hover over 'Handler'
    }
}

Expected Behavior:

EventHandler First.Handler

Actual Behavior:

EventHandler? First.Handler

@sharwell sharwell added help wanted The issue is "up for grabs" - add a comment if you are interested in working on it Area-IDE Concept-Continuous Improvement New Language Feature - Nullable Reference Types Nullable Reference Types IDE-IntelliSense Completion, Signature Help, Quick Info labels Apr 29, 2020
@sharwell sharwell added this to the Backlog milestone Apr 29, 2020
@jcouv
Copy link
Member

jcouv commented Apr 29, 2020

We have implemented no nullability checking for events yet. That is tracked by #29839

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Concept-Continuous Improvement help wanted The issue is "up for grabs" - add a comment if you are interested in working on it IDE-IntelliSense Completion, Signature Help, Quick Info IntelliSense-Quick Info New Language Feature - Nullable Reference Types Nullable Reference Types
Projects
None yet
Development

No branches or pull requests

2 participants