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

Partial properties: misc compiler layer work #73527

Merged
Prev Previous commit
Next Next commit
Address feedback
  • Loading branch information
RikkiGibson committed May 20, 2024
commit 9eb3524d0666929c747425b529338517db29be3c
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,13 @@ partial class C
// extern partial int P { get; set; }
Diagnostic(ErrorCode.ERR_DuplicateNameInClass, "P").WithArguments("C", "P").WithLocation(4, 24)
);

var members = comp.GetMembers<SourcePropertySymbol>("C.P");
RikkiGibson marked this conversation as resolved.
Show resolved Hide resolved
Assert.Equal(2, members.Length);
Assert.True(members[0].IsExtern);
Assert.True(members[0].IsPartialImplementation);
Assert.True(members[1].IsExtern);
Assert.True(members[1].IsPartialImplementation);
}

/// <summary>Based on <see cref="ExtendedPartialMethodsTests.Extern_Symbols" /> as a starting point.</summary>
Expand Down Expand Up @@ -4426,7 +4433,7 @@ partial class C
}
""";

var comp = CreateCompilation(source);
var comp = CreateCompilation(source, parseOptions.TestOptions.RegularNext);
RikkiGibson marked this conversation as resolved.
Show resolved Hide resolved
comp.VerifyEmitDiagnostics();

comp = CreateCompilation(source, parseOptions: TestOptions.Regular12);
Expand Down