Skip to content

Add PROTOTYPE comments to follow up on a previous change. #33440

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ public override Accessibility DeclaredAccessibility
if (!_explicitInterfaceImplementations.IsDefaultOrEmpty && ContainingType.IsInterface)
{
Debug.Assert(_explicitInterfaceImplementations.Length == 1);
// PROTOTYPE(DefaultInterfaceImplementation): This is better than 'private' accessibility, but might still be not where
// we want to be for implementations of internal members, because those can be
// inaccessible for base-access from a different assembly that otherwise has
// access to the original implemented member. That scenario has the internals
// being exposed to other assemblies by using InternalsVisibleTo attribute.
// See DefaultInterfaceImplementationTests.ExplicitBase_152 unit-test, for example.
return _explicitInterfaceImplementations[0].DeclaredAccessibility;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ public override Accessibility DeclaredAccessibility
if (!_explicitInterfaceImplementations.IsDefaultOrEmpty && ContainingType.IsInterface)
{
Debug.Assert(_explicitInterfaceImplementations.Length == 1);
// PROTOTYPE(DefaultInterfaceImplementation): This is better than 'private' accessibility, but might still be not where
// we want to be for implementations of internal members, because those can be
// inaccessible for base-access from a different assembly that otherwise has
// access to the original implemented member. That scenario has the internals
// being exposed to other assemblies by using InternalsVisibleTo attribute.
// See DefaultInterfaceImplementationTests.ExplicitBase_152 unit-test, for example.
return _explicitInterfaceImplementations[0].DeclaredAccessibility;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,12 @@ public override Accessibility DeclaredAccessibility
if (!_lazyExplicitInterfaceImplementations.IsDefaultOrEmpty)
{
Debug.Assert(_lazyExplicitInterfaceImplementations.Length == 1);
// PROTOTYPE(DefaultInterfaceImplementation): This is better than 'private' accessibility, but might still be not where
// we want to be for implementations of internal members, because those can be
// inaccessible for base-access from a different assembly that otherwise has
// access to the original implemented member. That scenario has the internals
// being exposed to other assemblies by using InternalsVisibleTo attribute.
// See DefaultInterfaceImplementationTests.ExplicitBase_152 unit-test, for example.
return _lazyExplicitInterfaceImplementations[0].DeclaredAccessibility;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,12 @@ public override Accessibility DeclaredAccessibility
if (!_explicitInterfaceImplementations.IsDefaultOrEmpty && ContainingType.IsInterface)
{
Debug.Assert(_explicitInterfaceImplementations.Length == 1);
// PROTOTYPE(DefaultInterfaceImplementation): This is better than 'private' accessibility, but might still be not where
// we want to be for implementations of internal members, because those can be
// inaccessible for base-access from a different assembly that otherwise has
// access to the original implemented member. That scenario has the internals
// being exposed to other assemblies by using InternalsVisibleTo attribute.
// See DefaultInterfaceImplementationTests.ExplicitBase_152 unit-test, for example.
return _explicitInterfaceImplementations[0].DeclaredAccessibility;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,12 @@ public override Accessibility DeclaredAccessibility
if (!_explicitInterfaceImplementations.IsDefaultOrEmpty && ContainingType.IsInterface)
{
Debug.Assert(_explicitInterfaceImplementations.Length == 1);
// PROTOTYPE(DefaultInterfaceImplementation): This is better than 'private' accessibility, but might still be not where
// we want to be for implementations of internal members, because those can be
// inaccessible for base-access from a different assembly that otherwise has
// access to the original implemented member. That scenario has the internals
// being exposed to other assemblies by using InternalsVisibleTo attribute.
// See DefaultInterfaceImplementationTests.ExplicitBase_152 unit-test, for example.
return _explicitInterfaceImplementations[0].DeclaredAccessibility;
}

Expand Down