diff --git a/src/AST/Function.cs b/src/AST/Function.cs index f509a9ab..fc01d9b8 100644 --- a/src/AST/Function.cs +++ b/src/AST/Function.cs @@ -93,7 +93,8 @@ namespace CppSharp.AST None, ComplementOperator, AbstractImplCall, - DefaultValueOverload + DefaultValueOverload, + InterfaceInstance } public class Function : Declaration, ITypedDecl, IMangledDecl diff --git a/src/AST/Property.cs b/src/AST/Property.cs index a5524f3a..0b530cd2 100644 --- a/src/AST/Property.cs +++ b/src/AST/Property.cs @@ -115,6 +115,11 @@ namespace CppSharp.AST } } + public bool IsSynthetized + { + get { return GetMethod != null && GetMethod.IsSynthetized; } + } + public override T Visit(IDeclVisitor visitor) { return visitor.VisitProperty(this); diff --git a/src/Generator/Passes/MultipleInheritancePass.cs b/src/Generator/Passes/MultipleInheritancePass.cs index edfd4469..23bd1ee7 100644 --- a/src/Generator/Passes/MultipleInheritancePass.cs +++ b/src/Generator/Passes/MultipleInheritancePass.cs @@ -84,7 +84,11 @@ namespace CppSharp.Passes instance.Namespace = @interface; instance.Name = Helpers.InstanceIdentifier; instance.QualifiedType = new QualifiedType(new BuiltinType(PrimitiveType.IntPtr)); - instance.GetMethod = new Method { Namespace = @interface }; + instance.GetMethod = new Method + { + SynthKind = FunctionSynthKind.InterfaceInstance, + Namespace = @interface + }; @interface.Properties.Add(instance); }