mirror of
https://github.com/denoland/deno.git
synced 2024-10-31 09:14:20 -04: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));
|