|
|
@ -1334,8 +1334,15 @@ namespace CppSharp.Generators.CSharp |
|
|
|
AddBlock(new Block(BlockKind.Unreachable)); |
|
|
|
AddBlock(new Block(BlockKind.Unreachable)); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
GenerateFunctionInProperty(@class, actualProperty.GetMethod, actualProperty, |
|
|
|
QualifiedType type = default; |
|
|
|
property.QualifiedType); |
|
|
|
if (actualProperty != property || |
|
|
|
|
|
|
|
// indexers
|
|
|
|
|
|
|
|
(property.QualifiedType.Type.IsPrimitiveType() && |
|
|
|
|
|
|
|
actualProperty.GetMethod.ReturnType.Type.IsPointerToPrimitiveType())) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type = property.QualifiedType; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
GenerateFunctionInProperty(@class, actualProperty.GetMethod, actualProperty, type); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static Property GetActualProperty(Property property, Class c) |
|
|
|
private static Property GetActualProperty(Property property, Class c) |
|
|
@ -2180,10 +2187,8 @@ namespace CppSharp.Generators.CSharp |
|
|
|
|
|
|
|
|
|
|
|
// ensure any virtual dtor in the chain is called
|
|
|
|
// ensure any virtual dtor in the chain is called
|
|
|
|
var dtor = @class.Destructors.FirstOrDefault(d => d.Access != AccessSpecifier.Private); |
|
|
|
var dtor = @class.Destructors.FirstOrDefault(d => d.Access != AccessSpecifier.Private); |
|
|
|
var baseDtor = @class.BaseClass == null ? null : |
|
|
|
|
|
|
|
@class.BaseClass.Destructors.FirstOrDefault(d => !d.IsVirtual); |
|
|
|
|
|
|
|
if (ShouldGenerateClassNativeField(@class) || |
|
|
|
if (ShouldGenerateClassNativeField(@class) || |
|
|
|
((dtor != null && (dtor.IsVirtual || @class.HasNonTrivialDestructor)) && baseDtor != null) || |
|
|
|
(dtor != null && (dtor.IsVirtual || @class.HasNonTrivialDestructor)) || |
|
|
|
// virtual destructors in abstract classes may lack a pointer in the v-table
|
|
|
|
// virtual destructors in abstract classes may lack a pointer in the v-table
|
|
|
|
// so they have to be called by symbol; thus we need an explicit Dispose override
|
|
|
|
// so they have to be called by symbol; thus we need an explicit Dispose override
|
|
|
|
@class.IsAbstract) |
|
|
|
@class.IsAbstract) |
|
|
@ -3464,11 +3469,6 @@ internal static{(@new ? " new" : string.Empty)} {printedClass} __GetInstance({Ty |
|
|
|
if (function.IsPure) |
|
|
|
if (function.IsPure) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
if (function.OriginalName == "system_do_it") |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
System.Diagnostics.Debugger.Break(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PushBlock(BlockKind.InternalsClassMethod); |
|
|
|
PushBlock(BlockKind.InternalsClassMethod); |
|
|
|
var callConv = function.CallingConvention.ToInteropCallConv(); |
|
|
|
var callConv = function.CallingConvention.ToInteropCallConv(); |
|
|
|
|
|
|
|
|
|
|
|