On Friday, 16 June 2023 at 07:47:50 UTC, Murloc wrote:
And since classes can be declared locally inside methods, you
can also do something similar this way:
```d
import std.stdio;
import std.conv;
Object getB() {
class B {
private int field = 30;
override string toS
On Friday, 16 June 2023 at 07:54:21 UTC, Richard (Rikki) Andrew
Cattermole wrote:
Also we have a Discord server which you are welcome to join!
https://discord.gg/bMZk9Q4
Thanks for the invitation. However, I don't like Discord so I
don't use it :)
Yes that is to be expected.
Also we have a Discord server which you are welcome to join!
https://discord.gg/bMZk9Q4
And since classes can be declared locally inside methods, you can
also do something similar this way:
```d
import std.stdio;
import std.conv;
Object getB() {
class B {
private int field = 30;
override string toString() => to!string(field);
}
return cast(O
I'm not sure if this behavior is desired and have any use-cases
(should I report it as a bug?), but, for example, C# doesn't
allow this.
```d
import std.conv;
class Outer {
private static class Inner {
private int field = 30;
override string toString() => to!string(field);
I'm not sure if this behavior is desired and have any use-cases
(should I report it as a bug?), but, for example, C# doesn't
allow this.
```d
import std.conv;
class Outer {
private static class Inner {
private int field = 30;
override string toString() => to!string(field);