mirror of
https://github.com/denoland/deno.git
synced 2024-12-27 01:29:14 -05:00
24 lines
373 B
Text
24 lines
373 B
Text
|
const g = [];
|
||
|
class G {
|
||
|
#g;
|
||
|
constructor(shared){
|
||
|
if (shared) {
|
||
|
this.#g = g;
|
||
|
} else {
|
||
|
this.#g = [];
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
const g1 = [];
|
||
|
class H {
|
||
|
#g;
|
||
|
constructor(shared1){
|
||
|
if (shared1) {
|
||
|
this.#g = g1;
|
||
|
} else {
|
||
|
this.#g = [];
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
console.log(new G(true), new H(true));
|