Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ impl<'a> GatherNodeParts<'a> for ChainElement<'a> {
fn gather<F: FnMut(&str)>(&self, f: &mut F) {
match self {
ChainElement::CallExpression(expr) => expr.gather(f),
expr => expr.to_member_expression().gather(f),
ChainElement::TSNonNullExpression(expr) => expr.expression.gather(f),
expr @ match_member_expression!(Self) => expr.to_member_expression().gather(f),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tasks/transform_conformance/snapshots/oxc.snap.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
commit: 6402dbbf

Passed: 231/379
Passed: 232/380

# All Passed:
* babel-plugin-transform-class-static-block
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Panicked when transforming optional chaining with TS non-null assertion inside a computed key.
// https://github.com/oxc-project/oxc/issues/22246
const x = a[b?.c!]?.["d"];
const y = a?.[b?.c!]?.d;
const z = a[b?.c!.d!]?.e;
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Panicked when transforming optional chaining with TS non-null assertion inside a computed key.
// https://github.com/oxc-project/oxc/issues/22246
var _a$b$c, _b, _a, _b2, _a$d, _b3;
const x = (_a$b$c = a[(_b = b) === null || _b === void 0 ? void 0 : _b.c]) === null || _a$b$c === void 0 ? void 0 : _a$b$c["d"];
const y = (_a = a) === null || _a === void 0 || (_a = _a[(_b2 = b) === null || _b2 === void 0 ? void 0 : _b2.c]) === null || _a === void 0 ? void 0 : _a.d;
const z = (_a$d = a[(_b3 = b) === null || _b3 === void 0 ? void 0 : _b3.c.d]) === null || _a$d === void 0 ? void 0 : _a$d.e;
Loading