diff --git a/IDEHelper/Compiler/BfExprEvaluator.cpp b/IDEHelper/Compiler/BfExprEvaluator.cpp index 892a181a..2baddf2e 100644 --- a/IDEHelper/Compiler/BfExprEvaluator.cpp +++ b/IDEHelper/Compiler/BfExprEvaluator.cpp @@ -16317,8 +16317,6 @@ void BfExprEvaluator::Visit(BfIndexerExpression* indexerExpr) if (checkMethod->mExplicitInterface != NULL) continue; - if (checkMethod->mIsOverride) - continue; auto autoComplete = GetAutoComplete(); bool wasCapturingMethodMatchInfo = false; diff --git a/IDEHelper/Tests/src/Indexers.bf b/IDEHelper/Tests/src/Indexers.bf new file mode 100644 index 00000000..c8a62db1 --- /dev/null +++ b/IDEHelper/Tests/src/Indexers.bf @@ -0,0 +1,48 @@ +using System; + +namespace Tests +{ + class Indexers + { + class ClassA + { + public virtual int this[int index] + { + get + { + return 123; + } + } + } + + class ClassB : ClassA + { + public override int this[int index] + { + get + { + return 234; + } + } + } + + class ClassC : ClassB + { + + } + + [Test] + public static void Hey() + { + ClassB cc = scope ClassC(); + ClassB cb = cc; + ClassA ca = cb; + int value = cc[0]; + Test.Assert(value == 234); + value = cb[0]; + Test.Assert(value == 234); + value = ca[0]; + Test.Assert(value == 234); + } + } +}