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

NativeAot doesn't warn for base/override annotation mismatch on generic virtual methods #77744

Closed
sbomer opened this issue Nov 1, 2022 · 2 comments

Comments

@sbomer
Copy link
Member

sbomer commented Nov 1, 2022

Description

NativeAot is missing warnings for virtual base/override validation when the virtual method is generic.

Reproduction Steps

class G
{
    public virtual void M<[DAM(DAMT.All)]T>([DAM(DAMT.All)] Type t) {}

    public virtual void M([DAM(DAMT.All)] Type t) {}
}

class D : G
{
    public override void M<T>(Type t) {} // no warning (for T or t)

    public override void M(Type t) {} // warning
}

Expected behavior

The generic parameter and the Type parameter of the derived method should warn about mismatching annotations.

Actual behavior

No warning

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Nov 1, 2022
@sbomer
Copy link
Member Author

sbomer commented Nov 17, 2022

Looks like this was fixed by #78157.

@sbomer sbomer closed this as completed Nov 17, 2022
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Nov 17, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Dec 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant