From 1e64b264ba7beaab16450212b0a25fd0111182e7 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Tue, 9 Feb 2021 18:50:30 +0100 Subject: [PATCH] Fix compilation errors after merge --- ql/src/codeql_ruby/ast/Statement.qll | 4 +--- ql/src/codeql_ruby/ast/internal/AST.qll | 6 ------ ql/src/codeql_ruby/ast/internal/Statement.qll | 3 ++- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/ql/src/codeql_ruby/ast/Statement.qll b/ql/src/codeql_ruby/ast/Statement.qll index edc62cf0627..7557799e712 100644 --- a/ql/src/codeql_ruby/ast/Statement.qll +++ b/ql/src/codeql_ruby/ast/Statement.qll @@ -9,7 +9,7 @@ private import codeql_ruby.controlflow.internal.ControlFlowGraphImpl * This is the root QL class for all statements. */ class Stmt extends AstNode { - Stmt::Range range; + override Stmt::Range range; Stmt() { this = range } @@ -38,8 +38,6 @@ class Stmt extends AstNode { class ReturningStmt extends Stmt { override ReturningStmt::Range range; - final override string toString() { result = range.toString() } - /** Gets the returned value, if any. */ final Expr getValue() { result = range.getValue() } } diff --git a/ql/src/codeql_ruby/ast/internal/AST.qll b/ql/src/codeql_ruby/ast/internal/AST.qll index 4073265a4d2..c8ef3f886c5 100644 --- a/ql/src/codeql_ruby/ast/internal/AST.qll +++ b/ql/src/codeql_ruby/ast/internal/AST.qll @@ -43,10 +43,6 @@ module AstNode { or this = any(Generated::RestAssignment ra).getChild() or - this instanceof Generated::Return - or - this instanceof Generated::Break - or this instanceof Generated::Alias or this instanceof Generated::SymbolArray @@ -65,8 +61,6 @@ module AstNode { or this instanceof Generated::EmptyStatement or - this instanceof Generated::Next - or this instanceof Generated::Redo or this instanceof Generated::Hash diff --git a/ql/src/codeql_ruby/ast/internal/Statement.qll b/ql/src/codeql_ruby/ast/internal/Statement.qll index 2a3a7ce1ef4..b4fa88ce159 100644 --- a/ql/src/codeql_ruby/ast/internal/Statement.qll +++ b/ql/src/codeql_ruby/ast/internal/Statement.qll @@ -1,8 +1,9 @@ private import codeql_ruby.AST +private import codeql_ruby.ast.internal.AST private import codeql_ruby.ast.internal.TreeSitter module Stmt { - abstract class Range extends AstNode { } + abstract class Range extends AstNode::Range { } } module ReturningStmt {