From 1447038ce1a43f612b8ded7bba195a3c6066c8a9 Mon Sep 17 00:00:00 2001 From: ElektroKill Date: Sun, 18 Sep 2022 20:16:27 +0200 Subject: [PATCH] Fix #2736 --- ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs b/ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs index 8a34310960..70b066dc82 100644 --- a/ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs +++ b/ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2013 AlphaSierraPapa for the SharpDevelop Team +// Copyright (c) 2010-2013 AlphaSierraPapa for the SharpDevelop Team // // Permission is hereby granted, free of charge, to any person obtaining a copy of this // software and associated documentation files (the "Software"), to deal in the Software @@ -1760,7 +1760,7 @@ ResolveResult LookInUsingScopeNamespace(ResolvedUsingScope usingScope, INamespac } // then look for a type ITypeDefinition def = n.GetTypeDefinition(identifier, k); - if (def != null) + if (def != null && TopLevelTypeDefinitionIsAccessible(def)) { IType result = def; if (parameterizeResultType && k > 0)