On Wednesday, 23 October 2024 at 12:46:24 UTC, Paul Backus wrote:
On Wednesday, 23 October 2024 at 12:32:09 UTC, Anton Pastukhov wrote:

There are two possible solutions to this. One is to make `MyStruct.test` a `static` variable:

```d
// Solution #1
struct MyStruct {
    static Test test = Test.Three;
}
```

The code also compiles like this. In this case, can we say that there are 3 solutions or are static and enum actually the same thing?

```d
struct MyStruct {
  enum test = Test.Three
}
```

SDB@79

Reply via email to