Skip to content

Commit

Permalink
Properly recognized non-class types as internal when using HaveAccess…
Browse files Browse the repository at this point in the history
…Modifier assertion (#1793)

* Fix an issue where interfaces and value types that were non nested would not be recognized as internal when using HaveAccessModifier.
  • Loading branch information
dennisdoomen committed Jan 30, 2022
1 parent 5f82aaf commit d2d02a8
Show file tree
Hide file tree
Showing 4 changed files with 576 additions and 487 deletions.
Expand Up @@ -87,7 +87,7 @@ internal static CSharpAccessModifier GetCSharpAccessModifier(this Type type)
return CSharpAccessModifier.Protected;
}

if (type.IsNestedAssembly || (type.IsClass && type.IsNotPublic))
if (type.IsNestedAssembly || type.IsNotPublic)
{
return CSharpAccessModifier.Internal;
}
Expand Down

0 comments on commit d2d02a8

Please sign in to comment.