Skip to content

Commit f4e4e89

Browse files
committed
CLJCLR-190: Allow RT.classForName to look up non-public types (fix a regression)
1 parent 0b729b3 commit f4e4e89

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Clojure/Clojure/Lib/RT.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2868,7 +2868,7 @@ internal static Type classForName(string p, Namespace ns, bool canCallClrTypeSpe
28682868

28692869
// Try using Type.GetType which can find types with assembly-qualified names.
28702870
t = Type.GetType(p, false);
2871-
if (t != null && (t.IsPublic || t.IsNestedPublic))
2871+
if (t != null)
28722872
{
28732873
NumDirects++;
28742874
return t;
@@ -2882,7 +2882,7 @@ internal static Type classForName(string p, Namespace ns, bool canCallClrTypeSpe
28822882
foreach (Assembly assy in loadedAssemblies)
28832883
{
28842884
Type t1 = assy.GetType(p, false);
2885-
if (t1 != null && (t1.IsPublic || t1.IsNestedPublic))
2885+
if (t1 != null)
28862886
{
28872887
NumLoadedAssemblyFinds++;
28882888
return t1;
@@ -2937,7 +2937,7 @@ internal static Type classForName(string p, Namespace ns, bool canCallClrTypeSpe
29372937
NumRuntimeAssemblyLoads++;
29382938
var assy = string.IsNullOrWhiteSpace(path) ? Assembly.Load(targetAssemblyName) : Assembly.LoadFrom(path);
29392939
var type = assy.GetType(p, false);
2940-
if (type != null && (type.IsPublic || type.IsNestedPublic))
2940+
if (type != null)
29412941
{
29422942
NumRuntimeAssemblyFinds++;
29432943
return type;

0 commit comments

Comments
 (0)