fix(es/es2015): Remove needless unreachable! (#9021)

**Related issue:**

 - Closes #9020
This commit is contained in:
Donny/강동윤 2024-06-05 15:05:22 +09:00 committed by GitHub
parent e3dfa8707a
commit 555e71cfd5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 28 additions and 1 deletions

View File

@ -0,0 +1,19 @@
{
"jsc": {
"parser": {
"syntax": "ecmascript",
"jsx": false
},
"target": "es5",
"loose": false,
"minify": {
"compress": false,
"mangle": false
}
},
"module": {
"type": "es6"
},
"minify": false,
"isModule": true
}

View File

@ -0,0 +1,4 @@
const student = {
name: "Tom",
age = 12
};

View File

@ -0,0 +1,4 @@
var student = {
name: "Tom",
age=12
};

View File

@ -64,7 +64,7 @@ impl VisitMut for PropFolder {
}
}
Prop::Assign(..) => unreachable!("assign property in object literal is invalid"),
Prop::Assign(..) => {}
Prop::Getter(..) => prop.visit_mut_children_with(&mut PropNameFolder {
props: &mut self.getter_props,