fix(es/transforms/compat): Change error message (#2500)

swc_ecma_transforms_compat:
 - `classes`: Use `unreachable` instead of `unimplemented ` for static blocks.
This commit is contained in:
Sosuke Suzuki 2021-10-21 15:15:08 +09:00 committed by GitHub
parent c29a6e11c9
commit 52dfb55816
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -404,7 +404,9 @@ where
// We just strip this. // We just strip this.
} }
ClassMember::Empty(..) => {} ClassMember::Empty(..) => {}
ClassMember::StaticBlock(..) => unimplemented!("stage 3 class static blocks"), ClassMember::StaticBlock(..) => unreachable!(
"classes pass: static blocks\nstatic_blocks pass should remove this"
),
} }
} }

View File

@ -721,7 +721,9 @@ impl ClassProperties {
}))) })))
} }
ClassMember::StaticBlock(..) => unimplemented!("stage 3 class static blocks"), ClassMember::StaticBlock(..) => unreachable!(
"classes pass: static blocks\nstatic_blocks pass should remove this"
),
} }
} }