On Monday, 30 June 2025 at 14:30:49 UTC, Manfred Nowak wrote:
On Sunday, 29 June 2025 at 13:06:38 UTC, Rajesh wrote:
[...]
```d
struct Problem {
this(int val) {
foreach (int number; myType)
return;
```
[...]
Is there a restriction [...]
Yes.
'this' is not allowed
On Monday, 30 June 2025 at 14:22:47 UTC, H. S. Teoh wrote:
On Mon, Jun 30, 2025 at 04:51:27AM +, Rajesh via
Digitalmars-d-learn wrote: [...]
```
Error: variable `__capture` cannot be read at compile time
onlineapp.d(27):called from here: `Problem(0).this(1)`
auto compile_time_var = P