Skip to content

Commit 217fa7a

Browse files
committed
Revert "unified: Validate that inheritance works"
This reverts commit b55eda6.
1 parent b55eda6 commit 217fa7a

3 files changed

Lines changed: 5 additions & 15 deletions

File tree

‎unified/extractor/ast_types.yml‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,11 @@ supertypes:
6363
- while_stmt
6464
- do_while_stmt
6565
- labeled_stmt
66-
function_like:
67-
- function_declaration
68-
- function_expr
6966
callable:
7067
subtypes:
7168
- top_level
72-
- function_like
69+
- function_expr
70+
- function_declaration
7371
- constructor_declaration
7472
- destructor_declaration
7573
- accessor_declaration

‎unified/ql/lib/codeql/unified/internal/Ast.qll‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -678,9 +678,7 @@ module Unified {
678678
}
679679

680680
/** A class representing `function_declaration` nodes. */
681-
class FunctionDeclaration extends @unified_function_declaration, F::FunctionLike, F::Member,
682-
F::Stmt
683-
{
681+
class FunctionDeclaration extends @unified_function_declaration, F::Callable, F::Member, F::Stmt {
684682
/** Gets the name of the primary QL class for this element. */
685683
final override string getAPrimaryQlClass() { result = "FunctionDeclaration" }
686684

@@ -736,7 +734,7 @@ module Unified {
736734
}
737735

738736
/** A class representing `function_expr` nodes. */
739-
class FunctionExpr extends @unified_function_expr, F::Expr, F::FunctionLike {
737+
class FunctionExpr extends @unified_function_expr, F::Callable, F::Expr {
740738
/** Gets the name of the primary QL class for this element. */
741739
final override string getAPrimaryQlClass() { result = "FunctionExpr" }
742740

@@ -778,8 +776,6 @@ module Unified {
778776
}
779777
}
780778

781-
class FunctionLike extends @unified_function_like, F::Callable { }
782-
783779
/** A class representing `generic_type_expr` nodes. */
784780
class GenericTypeExpr extends @unified_generic_type_expr, F::Expr {
785781
/** Gets the name of the primary QL class for this element. */
@@ -1898,8 +1894,6 @@ module UnifiedFinal {
18981894

18991895
final class FunctionExpr = F::FunctionExpr;
19001896

1901-
final class FunctionLike = F::FunctionLike;
1902-
19031897
final class GenericTypeExpr = F::GenericTypeExpr;
19041898

19051899
final class GuardIfStmt = F::GuardIfStmt;

‎unified/ql/lib/unified.dbscheme‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ unified_call_expr_def(
286286
int callee: @unified_expr ref
287287
);
288288

289-
@unified_callable = @unified_accessor_declaration | @unified_constructor_declaration | @unified_destructor_declaration | @unified_function_like | @unified_initializer_declaration | @unified_top_level
289+
@unified_callable = @unified_accessor_declaration | @unified_constructor_declaration | @unified_destructor_declaration | @unified_function_declaration | @unified_function_expr | @unified_initializer_declaration | @unified_top_level
290290

291291
#keyset[unified_catch_clause, index]
292292
unified_catch_clause_modifier(
@@ -552,8 +552,6 @@ unified_function_expr_def(
552552
unique int id: @unified_function_expr
553553
);
554554

555-
@unified_function_like = @unified_function_declaration | @unified_function_expr
556-
557555
#keyset[unified_generic_type_expr, index]
558556
unified_generic_type_expr_type_argument(
559557
int unified_generic_type_expr: @unified_generic_type_expr ref,

0 commit comments

Comments
 (0)