blob: 2382f0ad91c10db35cc453115af5b7f214b29f67 [file] [log] [blame]
class Foo {
constructor(o, value) {
try {
throw { o: 1 };
} catch({ o }){
if (o !== 1)
throw new Error();
o = 2;
}
if (o !== value)
throw new Error();
try {
throw [ 1 ];
} catch([ o ]){
if (o !== 1)
throw new Error();
o = 2;
}
if (o !== value)
throw new Error();
}
}
new Foo("string", "string");
class Bar {
constructor(value) {
let o = value;
try {
throw { o: 1 };
} catch({ o }){
if (o !== 1)
throw new Error();
o = 2;
}
if (o !== value)
throw new Error();
try {
throw [ 1 ];
} catch([ o ]){
if (o !== 1)
throw new Error();
o = 2;
}
if (o !== value)
throw new Error();
}
}
new Bar("string");
class Baz {
constructor(value) {
const o = value;
try {
throw { o: 1 };
} catch({ o }){
if (o !== 1)
throw new Error();
o = 2;
}
if (o !== value)
throw new Error();
try {
throw [ 1 ];
} catch([ o ]){
if (o !== 1)
throw new Error();
o = 2;
}
if (o !== value)
throw new Error();
}
}
new Baz("string");