Skip to content

Make members of SEALED classes ignore the /vo3 (All memebrs VIRTUAL) setting #785

@cpyrgas

Description

@cpyrgas

Suggested by Volkmar Rigo:

I tried to compile our main projects and I found a new warning, that might be a bit misleading. The project is a VO Project with "All members are virtual". This is the simplified code:

sealed class A
method Dummy(xx as usual) as string
return ""
end class

This code causes the warning " XS0549: 'A.Dummy(USUAL)' is a new virtual member in sealed type 'A'".

I assume that the compiler adds the virtual to the dummy method (because of the "all members are virtual") which then produces the warning, that virtual methods don't make sense in sealed classes.

As a workaround, I currently suppressed the warning XS0549 (because use "warn as error").

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions