August 31
On 8/31/24 11:23, Nick Treleaven wrote:
> 
> So the following error makes sense:
> 
>      alias x = s.expand[0];
>      x.writeln(); // Error: accessing non-static variable `x` requires an instance of `S`

It would be consistent, but it does not make sense.
September 02
On Saturday, 31 August 2024 at 12:43:53 UTC, Timon Gehr wrote:
> On 8/31/24 11:23, Nick Treleaven wrote:
>> 
>> So the following error makes sense:
>> 
>>      alias x = s.expand[0];
>>      x.writeln(); // Error: accessing non-static variable `x` requires an instance of `S`
>
> It would be consistent, but it does not make sense.

Why not?
September 02
On 8/28/24 18:37, Max Samukha wrote:
> On Sunday, 25 August 2024 at 19:40:48 UTC, Timon Gehr wrote:
>>
>> FWIW with my frontend this just works:
>>
> 
> I've always wished there'd be a way for a nested struct to access its parent context. Can your frontend handle something like this:
> 
> ...

Simplified example:

```d
struct S(alias instance){}

struct T{
    S!instance instance;
}
```

My frontend does not support this currently. It shouldn't be too hard to add support for this kind of thing though, as the general architecture of the code is set up to handle unusual analysis order. I am currently a bit too strapped on time to implement it, but will keep it in mind for when I possibly continue development on the frontend.
September 03
On 9/2/24 11:53, Nick Treleaven wrote:
> On Saturday, 31 August 2024 at 12:43:53 UTC, Timon Gehr wrote:
>> On 8/31/24 11:23, Nick Treleaven wrote:
>>>
>>> So the following error makes sense:
>>>
>>>      alias x = s.expand[0];
>>>      x.writeln(); // Error: accessing non-static variable `x` requires an instance of `S`
>>
>> It would be consistent, but it does not make sense.
> 
> Why not?

Because it does not just work. The thing it is consistent with does not make sense in the first place. What do we gain from this not working?
September 03
On Monday, 2 September 2024 at 14:35:56 UTC, Timon Gehr wrote:

> My frontend does not support this currently. It shouldn't be too hard to add support for this kind of thing though, as the general architecture of the code is set up to handle unusual analysis order. I am currently a bit too strapped on time to implement it, but will keep it in mind for when I possibly continue development on the frontend.

Understood, thanks.


September 03
Thank you. Anyone want to post it to https:issues.dlang.org ?
September 04
On Wednesday, 4 September 2024 at 00:32:02 UTC, Walter Bright wrote:
> Thank you. Anyone want to post it to https:issues.dlang.org ?

Manu already filed it, see:
https://issues.dlang.org/show_bug.cgi?id=24720
September 09
good!
1 2 3 4 5
Next ›   Last »