February 02, 2023 Issues » [Issue 23667] New: [REG2.101] Incorrect escape deprecation on scope lazy pointer parameter | |||
|---|---|---|---|
| |||
...error: <source>(3): Deprecation: escaping reference to outer local variable `i` Removing `lazy` makes the... | |||
January 21, 2023 General » Re: Why are you using `std.traits.fullyQualifiedName`? | |||
|---|---|---|---|
| |||
...if the alias name is in an outer scope, that's actually valuable information. Now... | |||
January 15, 2023 Learn » Re: How to access private variable of outer class from an inner struct | |||
|---|---|---|---|
| |||
ah, that's annoying, but I guess it's the only solution as it stands. | |||
January 15, 2023 Learn » Re: How to access private variable of outer class from an inner struct | |||
|---|---|---|---|
| |||
...int num;
struct Y {
X outer;
int fun() { return outer.num; }
}
Y y;
this(){
y... | |||
January 15, 2023 Learn » Re: How to access private variable of outer class from an inner struct | |||
|---|---|---|---|
| |||
You'll have to create your struct like `return Y(this)`. It basically depends on... | |||
January 15, 2023 Learn » Re: How to access private variable of outer class from an inner struct | |||
|---|---|---|---|
| |||
Thanks. How will the variable `outer` become the reference to the current `X` object (if... | |||
January 15, 2023 Learn » Re: How to access private variable of outer class from an inner struct | |||
|---|---|---|---|
| |||
...the outer class, like this:
```D
class X {
private int num;
struct Y {
X outer... | |||
January 15, 2023 Learn » How to access private variable of outer class from an inner struct | |||
|---|---|---|---|
| |||
If I have the following code:
```D
class X {
private int num;
struct Y {
// how... | |||
January 12, 2023 Learn » Re: Nested sibling classes | |||
|---|---|---|---|
| |||
...it needs the context pointer to the outer class. Just moving initialization into the constructor... | |||
January 12, 2023 Learn » Re: Nested sibling classes | |||
|---|---|---|---|
| |||
...try auto and static:
```d
class a
{ //outer
static class b
{ // inner 1
c C... | |||
Copyright © 1999-2021 by the D Language Foundation