dotnet / dotnet/vblang

Add shadow classes as a way to extend sealed classes.

Open
#204 8 comments 2 reactions 0 assignees View on GitHub
Proposal
Dominant language
No language data
Stars
328
Forks
71
PR merge metrics
No merged PRs in 30d

Description

We have a way to re-implement non-overridable (sealed) methods, fields and properties using the Shadows keyword.
But on class-level we do not have a way to override non-inheritable (sealed) classes.

I'd like to see the Shadow keyword for inheritance too, making the following syntax valid:
`Public Class MyClass`
` Inherits Shadows System.String`
`End Class`

The inherited class should 100% act like system.string, but with the possibility to reimplement (shadow) all public members.

An example of the internal representation of the shadowed class can be seen with the extension "ShadowClasses" (link: [https://marketplace.visualstudio.com/items?itemName=theoverweij.ShadowClasses-Extension-For-VB](url) )

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.