winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
4.76k stars 187 forks source link

Connection into hidden inner nodes should connect to parent (recursively) #6558

Closed eladb closed 1 month ago

eladb commented 1 month ago

I tried this:

bring cloud;

class A {
  pub bucket: cloud.Bucket;
  new() {
    this.bucket = new cloud.Bucket();
  }
}

class B {
  pub a: A;
  new() {
    this.a = new A();
  }
}

let b1 = new B() as "B1";
let b2 = new B() as "B2";

new cloud.Function(inflight () => {
  b1.a.bucket.put("hello.txt", "world");
  b2.a.bucket.list();
});

nodeof(b1.a.bucket).hidden = true;
nodeof(b2.a).hidden = true;

This happened:

image

I expected this:

I expected to see:

Is there a workaround?

No response

Anything else?

No response

Wing Version

No response

Node.js Version

No response

Platform(s)

No response

Community Notes

MarkMcCulloh commented 1 month ago

Dupe of #6523