Browse Source

Fixed a bug when having a field with a protected ignored type.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
pull/481/head
Dimitar Dobrev 10 years ago
parent
commit
a7799edb14
  1. 2
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs
  2. 10
      tests/CSharpTemp/CSharpTemp.h

2
src/Generator/Generators/CSharp/CSharpTextTemplate.cs

@ -646,6 +646,8 @@ namespace CppSharp.Generators.CSharp @@ -646,6 +646,8 @@ namespace CppSharp.Generators.CSharp
public void GenerateClassProlog(Class @class)
{
Write(@class.IsInternal ? "internal " : Helpers.GetAccess(@class.Access));
if (@class.Access == AccessSpecifier.Protected)
Write("internal ");
Write("unsafe ");
if (Driver.Options.GenerateAbstractImpls && @class.IsAbstract)

10
tests/CSharpTemp/CSharpTemp.h

@ -468,3 +468,13 @@ private: @@ -468,3 +468,13 @@ private:
HasVirtualDtor2* hasVirtualDtor2;
Bar* bar;
};
class HasProtectedNestedAnonymousType
{
protected:
union
{
int i;
double d;
} u;
};

Loading…
Cancel
Save