diff --git a/src/Generator/AST/Utils.cs b/src/Generator/AST/Utils.cs index d749b4e42..9074614ac 100644 --- a/src/Generator/AST/Utils.cs +++ b/src/Generator/AST/Utils.cs @@ -30,7 +30,7 @@ public static bool CheckIgnoreMethod(Method method) var isEmptyCtor = method.IsConstructor && method.Parameters.Count == 0; var @class = method.Namespace as Class; - if (@class != null && @class.IsValueType && isEmptyCtor && method.IsDefaulted) + if (@class != null && @class.IsValueType && isEmptyCtor && !@class.HasNonTrivialDefaultConstructor) return true; if (method.IsDestructor) diff --git a/tests/dotnet/CSharp/CSharp.Tests.cs b/tests/dotnet/CSharp/CSharp.Tests.cs index d7e69031f..a20025fd8 100644 --- a/tests/dotnet/CSharp/CSharp.Tests.cs +++ b/tests/dotnet/CSharp/CSharp.Tests.cs @@ -2050,7 +2050,6 @@ public void TestValueTypeStringMemberDefaulted() } [Test] - [Ignore("https://github.com/mono/CppSharp/issues/1777")] public void TestValueTypeStringMemberDefaultedCtor() { var test = new CSharp.ValueTypeNoCtor(); diff --git a/tests/dotnet/Common/Common.CSharp.csproj b/tests/dotnet/Common/Common.CSharp.csproj index 234531160..ab697a82e 100644 --- a/tests/dotnet/Common/Common.CSharp.csproj +++ b/tests/dotnet/Common/Common.CSharp.csproj @@ -1,5 +1,5 @@  - 10.0 + 11.0 \ No newline at end of file