Skip to content

Commit

Permalink
[corlib] Remove unmanaged type IsVisible path. Fixes #28235
Browse files Browse the repository at this point in the history
  • Loading branch information
marek-safar committed Mar 20, 2015
1 parent 50b27bb commit 93310d9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion external/referencesource
5 changes: 0 additions & 5 deletions mcs/class/corlib/System/RuntimeTypeHandle.cs
Expand Up @@ -210,11 +210,6 @@ internal static bool IsSzArray(RuntimeType type)
return IsArray (type) && type.GetArrayRank () == 1;
}

internal static bool IsVisible (RuntimeType type)
{
return type.IsPublic;
}

internal static bool IsInterface (RuntimeType type)
{
return (type.Attributes & TypeAttributes.ClassSemanticsMask) == TypeAttributes.Interface;
Expand Down
12 changes: 12 additions & 0 deletions mcs/class/corlib/Test/System/TypeTest.cs
Expand Up @@ -283,6 +283,11 @@ public interface IFace {
{
}

public class Nested
{

}

[Test]
public void TestIsAssignableFrom ()
{
Expand Down Expand Up @@ -1693,6 +1698,13 @@ public void IsValueType ()
Assert.IsTrue (typeof (TimeSpan).IsValueType, "#6");
}

[Test]
public void IsVisible ()
{
Assert.IsTrue (typeof (int).IsVisible, "#1");
Assert.IsTrue (typeof (Nested).IsVisible, "#2");
}

[Test]
public void GetTypeNonVectorArray ()
{
Expand Down

0 comments on commit 93310d9

Please sign in to comment.