JsModule { bom_token: missing (optional), interpreter_token: missing (optional), directives: JsDirectiveList [], items: JsModuleItemList [ JsClassDeclaration { decorators: JsDecoratorList [], abstract_token: missing (optional), class_token: CLASS_KW@0..6 "class" [] [Whitespace(" ")], id: JsIdentifierBinding { name_token: IDENT@6..11 "Test" [] [Whitespace(" ")], }, type_parameters: missing (optional), extends_clause: JsExtendsClause { extends_token: EXTENDS_KW@11..19 "extends" [] [Whitespace(" ")], super_class: JsIdentifierExpression { name: JsReferenceIdentifier { value_token: IDENT@19..21 "B" [] [Whitespace(" ")], }, }, type_arguments: missing (optional), }, implements_clause: missing (optional), l_curly_token: L_CURLY@21..22 "{" [] [], members: JsClassMemberList [ JsMethodClassMember { modifiers: JsMethodModifierList [], async_token: missing (optional), star_token: missing (optional), name: JsLiteralMemberName { value: IDENT@22..29 "test" [Newline("\n"), Whitespace(" ")] [], }, question_mark_token: missing (optional), type_parameters: missing (optional), parameters: JsParameters { l_paren_token: L_PAREN@29..30 "(" [] [], items: JsParameterList [], r_paren_token: R_PAREN@30..32 ")" [] [Whitespace(" ")], }, return_type_annotation: missing (optional), body: JsFunctionBody { l_curly_token: L_CURLY@32..33 "{" [] [], directives: JsDirectiveList [], statements: JsStatementList [ JsExpressionStatement { expression: JsCallExpression { callee: JsBogusExpression { items: [ SUPER_KW@33..43 "super" [Newline("\n"), Whitespace(" ")] [], ], }, optional_chain_token: missing (optional), type_arguments: missing (optional), arguments: JsCallArguments { l_paren_token: L_PAREN@43..44 "(" [] [], args: JsCallArgumentList [], r_paren_token: R_PAREN@44..45 ")" [] [], }, }, semicolon_token: SEMICOLON@45..46 ";" [] [], }, JsExpressionStatement { expression: JsCallExpression { callee: JsStaticMemberExpression { object: JsBogusExpression { items: [ SUPER_KW@46..56 "super" [Newline("\n"), Whitespace(" ")] [], ], }, operator_token: QUESTIONDOT@56..58 "?." [] [], member: JsName { value_token: IDENT@58..62 "test" [] [], }, }, optional_chain_token: missing (optional), type_arguments: missing (optional), arguments: JsCallArguments { l_paren_token: L_PAREN@62..63 "(" [] [], args: JsCallArgumentList [], r_paren_token: R_PAREN@63..64 ")" [] [], }, }, semicolon_token: SEMICOLON@64..65 ";" [] [], }, ], r_curly_token: R_CURLY@65..69 "}" [Newline("\n"), Whitespace(" ")] [], }, }, ], r_curly_token: R_CURLY@69..71 "}" [Newline("\n")] [], }, JsExpressionStatement { expression: JsCallExpression { callee: JsBogusExpression { items: [ SUPER_KW@71..77 "super" [Newline("\n")] [], ], }, optional_chain_token: missing (optional), type_arguments: missing (optional), arguments: JsCallArguments { l_paren_token: L_PAREN@77..78 "(" [] [], args: JsCallArgumentList [], r_paren_token: R_PAREN@78..79 ")" [] [], }, }, semicolon_token: SEMICOLON@79..80 ";" [] [], }, ], eof_token: EOF@80..81 "" [Newline("\n")] [], } 0: JS_MODULE@0..81 0: (empty) 1: (empty) 2: JS_DIRECTIVE_LIST@0..0 3: JS_MODULE_ITEM_LIST@0..80 0: JS_CLASS_DECLARATION@0..71 0: JS_DECORATOR_LIST@0..0 1: (empty) 2: CLASS_KW@0..6 "class" [] [Whitespace(" ")] 3: JS_IDENTIFIER_BINDING@6..11 0: IDENT@6..11 "Test" [] [Whitespace(" ")] 4: (empty) 5: JS_EXTENDS_CLAUSE@11..21 0: EXTENDS_KW@11..19 "extends" [] [Whitespace(" ")] 1: JS_IDENTIFIER_EXPRESSION@19..21 0: JS_REFERENCE_IDENTIFIER@19..21 0: IDENT@19..21 "B" [] [Whitespace(" ")] 2: (empty) 6: (empty) 7: L_CURLY@21..22 "{" [] [] 8: JS_CLASS_MEMBER_LIST@22..69 0: JS_METHOD_CLASS_MEMBER@22..69 0: JS_METHOD_MODIFIER_LIST@22..22 1: (empty) 2: (empty) 3: JS_LITERAL_MEMBER_NAME@22..29 0: IDENT@22..29 "test" [Newline("\n"), Whitespace(" ")] [] 4: (empty) 5: (empty) 6: JS_PARAMETERS@29..32 0: L_PAREN@29..30 "(" [] [] 1: JS_PARAMETER_LIST@30..30 2: R_PAREN@30..32 ")" [] [Whitespace(" ")] 7: (empty) 8: JS_FUNCTION_BODY@32..69 0: L_CURLY@32..33 "{" [] [] 1: JS_DIRECTIVE_LIST@33..33 2: JS_STATEMENT_LIST@33..65 0: JS_EXPRESSION_STATEMENT@33..46 0: JS_CALL_EXPRESSION@33..45 0: JS_BOGUS_EXPRESSION@33..43 0: SUPER_KW@33..43 "super" [Newline("\n"), Whitespace(" ")] [] 1: (empty) 2: (empty) 3: JS_CALL_ARGUMENTS@43..45 0: L_PAREN@43..44 "(" [] [] 1: JS_CALL_ARGUMENT_LIST@44..44 2: R_PAREN@44..45 ")" [] [] 1: SEMICOLON@45..46 ";" [] [] 1: JS_EXPRESSION_STATEMENT@46..65 0: JS_CALL_EXPRESSION@46..64 0: JS_STATIC_MEMBER_EXPRESSION@46..62 0: JS_BOGUS_EXPRESSION@46..56 0: SUPER_KW@46..56 "super" [Newline("\n"), Whitespace(" ")] [] 1: QUESTIONDOT@56..58 "?." [] [] 2: JS_NAME@58..62 0: IDENT@58..62 "test" [] [] 1: (empty) 2: (empty) 3: JS_CALL_ARGUMENTS@62..64 0: L_PAREN@62..63 "(" [] [] 1: JS_CALL_ARGUMENT_LIST@63..63 2: R_PAREN@63..64 ")" [] [] 1: SEMICOLON@64..65 ";" [] [] 3: R_CURLY@65..69 "}" [Newline("\n"), Whitespace(" ")] [] 9: R_CURLY@69..71 "}" [Newline("\n")] [] 1: JS_EXPRESSION_STATEMENT@71..80 0: JS_CALL_EXPRESSION@71..79 0: JS_BOGUS_EXPRESSION@71..77 0: SUPER_KW@71..77 "super" [Newline("\n")] [] 1: (empty) 2: (empty) 3: JS_CALL_ARGUMENTS@77..79 0: L_PAREN@77..78 "(" [] [] 1: JS_CALL_ARGUMENT_LIST@78..78 2: R_PAREN@78..79 ")" [] [] 1: SEMICOLON@79..80 ";" [] [] 4: EOF@80..81 "" [Newline("\n")] [] -- super_expression_err.js:3:5 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × `super` is only valid inside of a class constructor of a subclass. 1 │ class Test extends B { 2 │ test() { > 3 │ super(); │ ^^^^^ 4 │ super?.test(); 5 │ } -- super_expression_err.js:4:5 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Super doesn't support optional chaining as super can never be null 2 │ test() { 3 │ super(); > 4 │ super?.test(); │ ^^^^^ 5 │ } 6 │ } -- super_expression_err.js:7:1 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × `super` is only valid inside of a class constructor of a subclass. 5 │ } 6 │ } > 7 │ super(); │ ^^^^^ 8 │ -- class Test extends B { test() { super(); super?.test(); } } super();