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

Should reject changing method visibility while overriding #289

Closed
rix0rrr opened this issue Nov 2, 2018 · 1 comment
Closed

Should reject changing method visibility while overriding #289

rix0rrr opened this issue Nov 2, 2018 · 1 comment
Assignees
Labels
effort/medium Medium work item – a couple days of effort feature-request A feature should be added or improved. language/dotnet Related to .NET bindings (C#, F#, ...) p1

Comments

@rix0rrr
Copy link
Contributor

rix0rrr commented Nov 2, 2018

The following is NOT allowed in C#:

class A {
    protected fn() {
    }
}

class B extends A {
    public fn() {
    }
}

I honestly don't understand why, it seems like yet another perfectly reasonable thing to allow, but like Return Value Covariance it's one of those things that C# draws a hard line on and so we have to disallow it in jsii.

@SomayaB SomayaB added feature-request A feature should be added or improved. language/dotnet Related to .NET bindings (C#, F#, ...) labels Nov 18, 2019
@SomayaB SomayaB added the still-relevant? Checking to see if the issue is still relevant label Dec 19, 2019
@RomainMuller RomainMuller removed the still-relevant? Checking to see if the issue is still relevant label Jan 7, 2020
@MrArnoldPalmer MrArnoldPalmer added the effort/medium Medium work item – a couple days of effort label Mar 14, 2020
@RomainMuller
Copy link
Contributor

Closed by #1876

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/medium Medium work item – a couple days of effort feature-request A feature should be added or improved. language/dotnet Related to .NET bindings (C#, F#, ...) p1
Projects
None yet
Development

No branches or pull requests

4 participants