mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
Ruby: make some generated predicates final
This commit is contained in:
@@ -68,6 +68,7 @@ impl<'a> fmt::Display for Class<'a> {
|
||||
qldoc: None,
|
||||
name: self.name,
|
||||
overridden: false,
|
||||
is_final: false,
|
||||
return_type: None,
|
||||
formal_parameters: vec![],
|
||||
body: charpred.clone(),
|
||||
@@ -239,6 +240,7 @@ pub struct Predicate<'a> {
|
||||
pub qldoc: Option<String>,
|
||||
pub name: &'a str,
|
||||
pub overridden: bool,
|
||||
pub is_final: bool,
|
||||
pub return_type: Option<Type<'a>>,
|
||||
pub formal_parameters: Vec<FormalParameter<'a>>,
|
||||
pub body: Expression<'a>,
|
||||
@@ -249,6 +251,9 @@ impl<'a> fmt::Display for Predicate<'a> {
|
||||
if let Some(qldoc) = &self.qldoc {
|
||||
write!(f, "/** {} */", qldoc)?;
|
||||
}
|
||||
if self.is_final {
|
||||
write!(f, "final ")?;
|
||||
}
|
||||
if self.overridden {
|
||||
write!(f, "override ")?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user