May 01, 2021 General » Re: Array literals are weird. | |||
|---|---|---|---|
| |||
...this case, `foo` could e.g. store `bar` in a global variable causing memory corruption... | |||
May 01, 2021 General » Array literals are weird. | |||
|---|---|---|---|
| |||
...do this: ```D int[3] bar = [1, 2, 3]; foo(bar); // Now it works with... | |||
April 29, 2021 Issues » [Issue 21877] New: VS2019 crash with "Show parameter storage class at call site" | |||
|---|---|---|---|
| |||
...void foo(ref int bar); int bar; foo(bar); foo(bar); } Now wait for the... | |||
April 26, 2021 Learn » Re: What's a good approach to DRY with the block code of a case-statement? | |||
|---|---|---|---|
| |||
...alias stuff = AliasSeq!(VAL_FOO, MyType, VAL_BAR, MyOtherType, /* ... */);
sw: switch (val)
{
static foreach (i... | |||
April 26, 2021 Issues » [Issue 21864] New: Line numbers and file names wrong in stack trace for Dward debug info | |||
|---|---|---|---|
| |||
...import test20460b;
void main ()
{
foo(); // L7
}
int bar ()
{
throw new Exception("Hello"); // L12
}
module test20460b... | |||
April 25, 2021 Learn » Struct initialization extra comma - should it compile | |||
|---|---|---|---|
| |||
...int x, y, z;
}
void main()
{
Foo bar = Foo(1,);
}
This compiles without syntax errors... | |||
April 23, 2021 Announce » Re: ae v0.0.3000 | |||
|---|---|---|---|
| |||
...it's pretty effective to spam space bar while moving left-to right, and then... | |||
April 21, 2021 Learn » Re: Voldemort type "this" pointer | |||
|---|---|---|---|
| |||
...foo");
struct S {
void bar() {
writeln(&i, " <- dynamic memory inside bar");
}
}
return S();
}
void main... | |||
April 18, 2021 Learn » Re: What are virtual functions? | |||
|---|---|---|---|
| |||
...Y {
public void bar (B b) {}
}
class X : Y {
public override void bar (A a){}
}
```
| |||
April 15, 2021 Issues » [Issue 21829] New: `private` is ignored when a public overload exists | |||
|---|---|---|---|
| |||
...d
void main()
{
import bar;
foo(1); // Compiles, violating private.
}
--- bar.d
import std.stdio... | |||
Copyright © 1999-2021 by the D Language Foundation