Search

February 02, 2023
Issues »
...error:
<source>(3): Deprecation: escaping reference to outer local variable `i`

Removing `lazy` makes the...
January 21, 2023
General »
...if the alias name is in an outer scope, that's actually valuable information.

Now...
January 15, 2023
Learn »
ah, that's annoying, but I guess it's the only solution as it stands.

January 15, 2023
Learn »
...int num;

    struct Y {
        X outer;
        int fun() { return outer.num; }
    }

    Y y;
    this(){
        y...
January 15, 2023
Learn »

You'll have to create your struct like `return Y(this)`. It basically depends on...
January 15, 2023
Learn »
Thanks.

How will the variable `outer` become the reference to the current `X` object (if...
January 15, 2023
Learn »
...the outer class, like this:

```D
class X {
    private int num;

    struct Y {
        X outer...
January 15, 2023
Learn »
If I have the following code:

```D
class X {
    private int num;

    struct Y {
        // how...
January 12, 2023
Learn »
...it needs the context pointer to the outer class.

Just moving initialization into the constructor...
January 12, 2023
Learn »
...try auto and static:

```d
class a
{ //outer

  static class b
  { // inner 1

    c C...
1 2 3 4 5 6 7 8 9 10
Next ›   Last »