From 4a0167e10ce8bff0cce3f02c4e7ae6512c518034 Mon Sep 17 00:00:00 2001 From: Dimitar Dobrev Date: Wed, 2 Aug 2017 00:03:15 +0300 Subject: [PATCH] Made whether a method is an override adjustable. Signed-off-by: Dimitar Dobrev --- src/AST/Method.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/AST/Method.cs b/src/AST/Method.cs index 7847969a..38ff15dc 100644 --- a/src/AST/Method.cs +++ b/src/AST/Method.cs @@ -117,7 +117,13 @@ namespace CppSharp.AST public bool IsStatic { get; set; } public bool IsConst { get; set; } public bool IsExplicit { get; set; } - public bool IsOverride => OverriddenMethods.Any(); + + public bool IsOverride + { + get { return isOverride ?? OverriddenMethods.Any(); } + set { isOverride = value; } + } + public Method BaseMethod => IsOverride ? OverriddenMethods[0] : null; // True if the method is final / sealed. @@ -176,5 +182,7 @@ namespace CppSharp.AST { return visitor.VisitMethodDecl(this); } + + private bool? isOverride; } } \ No newline at end of file