Struct inside a class: How to get outer?

Nick Sabalausky (Abscissa) SeeWebsiteToContactMe at semitwist.com
Sun Dec 3 06:05:00 UTC 2017


Is this even possible? My attempts:

class Outer {
	struct Inner {
		void foo() {
			// Error: no property 'outer' for type 'Inner'
			Outer o = this.outer;

			// Error: cannot implicitly convert expression
			// this of type Inner to testNested.Outer
			Outer o = this;
		}
	}
}


More information about the Digitalmars-d-learn mailing list