Skip to content

Commit

Permalink
feat: disable all access checks (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
mob-sakai committed Aug 12, 2020
1 parent d9182d9 commit 58909d5
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Microsoft.CodeAnalysis.PooledObjects;
using Roslyn.Utilities;

#pragma warning disable CS0162
namespace Microsoft.CodeAnalysis.CSharp
{
/// <summary>
Expand All @@ -22,6 +23,7 @@ internal static class AccessCheck
AssemblySymbol within,
ref HashSet<DiagnosticInfo> useSiteDiagnostics)
{
return true;
bool failedThroughTypeCheck;
return IsSymbolAccessibleCore(symbol, within, null, out failedThroughTypeCheck, within.DeclaringCompilation, ref useSiteDiagnostics);
}
Expand All @@ -36,6 +38,7 @@ internal static class AccessCheck
ref HashSet<DiagnosticInfo> useSiteDiagnostics,
TypeSymbol throughTypeOpt = null)
{
return true;
bool failedThroughTypeCheck;
return IsSymbolAccessibleCore(symbol, within, throughTypeOpt, out failedThroughTypeCheck, within.DeclaringCompilation, ref useSiteDiagnostics);
}
Expand All @@ -53,6 +56,8 @@ internal static class AccessCheck
ref HashSet<DiagnosticInfo> useSiteDiagnostics,
ConsList<TypeSymbol> basesBeingResolved = null)
{
failedThroughTypeCheck = false;
return true;
return IsSymbolAccessibleCore(symbol, within, throughTypeOpt, out failedThroughTypeCheck, within.DeclaringCompilation, ref useSiteDiagnostics, basesBeingResolved);
}

Expand All @@ -62,6 +67,8 @@ internal static class AccessCheck
/// </summary>
internal static bool IsEffectivelyPublicOrInternal(Symbol symbol, out bool isInternal)
{
isInternal = true;
return true;
Debug.Assert(symbol is object);

switch (symbol.Kind)
Expand Down Expand Up @@ -658,6 +665,7 @@ static void getBaseInterfaces(TypeSymbol derived, ArrayBuilder<NamedTypeSymbol>
/// <param name="toAssembly">The assembly possibly providing symbols to be accessed.</param>
internal static bool HasInternalAccessTo(this AssemblySymbol fromAssembly, AssemblySymbol toAssembly)
{
return true;
if (Equals(fromAssembly, toAssembly))
{
return true;
Expand Down

0 comments on commit 58909d5

Please sign in to comment.