Permalink
Browse files

Made whether a method is an override adjustable.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
  • Loading branch information...
ddobrev committed Aug 1, 2017
1 parent 6616091 commit 4a0167e10ce8bff0cce3f02c4e7ae6512c518034
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/AST/Method.cs
@@ -117,7 +117,13 @@ public Method(Function function)
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 @@ public override T Visit<T>(IDeclVisitor<T> visitor)
{
return visitor.VisitMethodDecl(this);
}
private bool? isOverride;
}
}

0 comments on commit 4a0167e

Please sign in to comment.