From 8cb8ead48eee4dae30c8508ae47e3667ee8102fd Mon Sep 17 00:00:00 2001 From: Nick Rolfe Date: Thu, 7 Jan 2021 19:02:14 +0000 Subject: [PATCH] Address more feedback on ExprSequence --- ql/src/codeql_ruby/ast/Expr.qll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ql/src/codeql_ruby/ast/Expr.qll b/ql/src/codeql_ruby/ast/Expr.qll index b32251966f7..4b51b448ac5 100644 --- a/ql/src/codeql_ruby/ast/Expr.qll +++ b/ql/src/codeql_ruby/ast/Expr.qll @@ -83,12 +83,12 @@ class ExprSequence extends Expr { final override string toString() { result = "...; ..." } /** Gets the `n`th expression in this sequence. */ - final Expr getExpr(int n) { result = this.(ExprSequence::Range).getExpr(n) } + final Expr getExpr(int n) { result = range.getExpr(n) } /** Gets an expression in this sequence. */ final Expr getAnExpr() { result = this.getExpr(_) } - /** Gets the last expression in this sequence. */ + /** Gets the last expression in this sequence, if any. */ final Expr getLastExpr() { result = this.getExpr(this.getNumberOfExpressions() - 1) } /** Gets the number of expressions in this sequence. */