On Friday, 24 February 2023 at 15:28:18 UTC, Steven Schveighoffer
wrote:
On 2/24/23 7:00 AM, Elfstone wrote:
Seems like the same bug is still there after ten years.
`static` should not affect module-level functions, but also,
this code should work without `static`.
Reported, not sure if t
On Friday, 24 February 2023 at 14:22:17 UTC, user1234 wrote:
you can break using `goto`, restore `static` everywhere, and
using local introspection determine whether the result exists.
```d
struct Bar
{
@("hello") int t;
}
static bool hasAttribute(alias F, T)()
{
static foreach
On 2/24/23 7:00 AM, Elfstone wrote:
Seems like the same bug is still there after ten years.
`static` should not affect module-level functions, but also, this code
should work without `static`.
Reported, not sure if there's a previous bug, it was hard to come up
with a good description:
On Friday, 24 February 2023 at 12:00:41 UTC, Elfstone wrote:
Seems like the same bug is still there after ten years.
```d
struct Bar
{
@("hello") int t;
}
static bool hasAttribute(alias F, T)()
{
bool result = false;
https://forum.dlang.org/post/imnannjdgtjnlzevh...@forum.dlang.org
On Saturday, 24 August 2013 at 11:47:43 UTC, Matej Nanut wrote:
On Friday, 23 August 2013 at 22:54:33 UTC, Jonathan M Davis
wrote:
Because without static it's a member variable, which means
that you have to
have a constructed obj
On Friday, 23 August 2013 at 22:54:33 UTC, Jonathan M Davis wrote:
Because without static it's a member variable, which means that
you have to
have a constructed object to access it (since it's part of the
object). When
you declare a variable in a class or struct static, then
there's only one f
On Friday, August 23, 2013 23:28:46 Matej Nanut wrote:
> Hello!
>
> I've run into this issue that I don't understand, maybe someone
> can enlighten me. :)
>
> This code:
> ---
> struct Thing
> {
> int i;
> }
>
> void main()
> {
> t!(Thing.i)();
> }
>
> void t(alias a)()
> {
> return;
> }
> ---
Hello!
I've run into this issue that I don't understand, maybe someone
can enlighten me. :)
This code:
---
struct Thing
{
int i;
}
void main()
{
t!(Thing.i)();
}
void t(alias a)()
{
return;
}
---
fails to compile with: ‘Error: need 'this' for 't' of type 'pure
nothrow @safe voi