Permalink
Browse files

Deleted code made redundant by the equalisation of access for overrides.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
  • Loading branch information...
ddobrev committed Jul 27, 2017
1 parent e2e4109 commit 8cb7207df770da1cf57a3e08a3945ecee361129e
Showing with 2 additions and 11 deletions.
  1. +2 −11 src/Generator/Passes/CheckIgnoredDecls.cs
@@ -12,8 +12,6 @@ public class CheckIgnoredDeclsPass : TranslationUnitPass
public bool CheckDeclarationAccess(Declaration decl)
{
var generateNonPublicDecls = Options.IsCSharpGenerator;
switch (decl.Access)
{
case AccessSpecifier.Public:
@@ -22,16 +20,9 @@ public bool CheckDeclarationAccess(Declaration decl)
var @class = decl.Namespace as Class;
if (@class != null && @class.IsValueType)
return false;
return generateNonPublicDecls;
return Options.IsCSharpGenerator;
case AccessSpecifier.Private:
var method = decl as Method;
var isOverride = false;
if (method != null && method.IsOverride)
{
var baseMethod = ((Class) method.Namespace).GetBaseMethod(method);
isOverride = baseMethod.IsGenerated;
}
return generateNonPublicDecls && (isOverride || decl.IsExplicitlyGenerated);
return false;
}
return true;

0 comments on commit 8cb7207

Please sign in to comment.