mirror of
https://github.com/swc-project/swc.git
synced 2024-11-24 10:12:42 +03:00
super() should be first (#918)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
This commit is contained in:
parent
0ac55ae68b
commit
0a7f3a28ee
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "swc_ecma_transforms"
|
||||
version = "0.17.0"
|
||||
version = "0.17.1"
|
||||
authors = ["강동윤 <kdy1997.dev@gmail.com>"]
|
||||
license = "Apache-2.0/MIT"
|
||||
repository = "https://github.com/swc-project/swc.git"
|
||||
|
@ -656,3 +656,18 @@ to!(
|
||||
newLine = encoder.encode("\r\n");
|
||||
}"#
|
||||
);
|
||||
|
||||
to!(
|
||||
issue_912,
|
||||
r#"export class BadRequestError extends Error {
|
||||
constructor(public readonly message: string) {
|
||||
super(message)
|
||||
}
|
||||
}"#,
|
||||
r#"export class BadRequestError extends Error {
|
||||
constructor(message) {
|
||||
super(message)
|
||||
this.message = message
|
||||
}
|
||||
}"#
|
||||
);
|
||||
|
@ -1462,6 +1462,10 @@ pub fn prepend_stmts<T: StmtLike>(
|
||||
Some(&Stmt::Expr(ExprStmt { ref expr, .. }))
|
||||
if match &**expr {
|
||||
Expr::Lit(Lit::Str(..)) => true,
|
||||
Expr::Call(expr) => match expr.callee {
|
||||
ExprOrSuper::Super(_) => true,
|
||||
ExprOrSuper::Expr(_) => false,
|
||||
},
|
||||
_ => false,
|
||||
} =>
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user