mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
refactor(semantic): use Expression::is_super (#7851)
Shorten code by using `Expression::is_super`, which was introduced in #7831.
This commit is contained in:
parent
e49de81544
commit
5d42df8dd6
1 changed files with 2 additions and 2 deletions
|
|
@ -975,8 +975,8 @@ fn super_private(span: Span) -> OxcDiagnostic {
|
|||
|
||||
pub fn check_member_expression(member_expr: &MemberExpression, ctx: &SemanticBuilder<'_>) {
|
||||
if let MemberExpression::PrivateFieldExpression(private_expr) = member_expr {
|
||||
// super.#m
|
||||
if let Expression::Super(_) = &private_expr.object {
|
||||
// `super.#m`
|
||||
if private_expr.object.is_super() {
|
||||
ctx.error(super_private(private_expr.span));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue