From b71a37d15457aadb82378c2038ce3c122bcd6e58 Mon Sep 17 00:00:00 2001 From: Dimitar Dobrev Date: Wed, 2 Aug 2017 00:50:14 +0300 Subject: [PATCH] Simplified and stabilised the getting of the base of a method. Signed-off-by: Dimitar Dobrev --- src/AST/Method.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AST/Method.cs b/src/AST/Method.cs index 38ff15dc..9fb950a6 100644 --- a/src/AST/Method.cs +++ b/src/AST/Method.cs @@ -124,7 +124,7 @@ namespace CppSharp.AST set { isOverride = value; } } - public Method BaseMethod => IsOverride ? OverriddenMethods[0] : null; + public Method BaseMethod => OverriddenMethods.FirstOrDefault(); // True if the method is final / sealed. public bool IsFinal { get; set; }