-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Labels
Area-CompilersFeature - Extension EverythingThe extension everything featureThe extension everything feature
Milestone
Description
Version Used: de9d72e
Steps to Reproduce:
[Fact]
public void Cls()
{
var src = """
[assembly: System.CLSCompliant(true)]
public static class Extensions
{
extension(object) { }
}
""";
CreateCompilation(src).VerifyEmitDiagnostics();
}Fails on this assert because the extension block has no base:
| System.Diagnostics.Debug.Assert((object)baseType != null || symbol.SpecialType == SpecialType.System_Object, "Only object has no base."); |
Metadata
Metadata
Assignees
Labels
Area-CompilersFeature - Extension EverythingThe extension everything featureThe extension everything feature