[Issue 18868] Separate compilation generates two static this functions, runs it twice

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 4 13:21:29 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18868

FeepingCreature <default_357-line at yahoo.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |default_357-line at yahoo.de

--- Comment #4 from FeepingCreature <default_357-line at yahoo.de> ---
This also fixes this issue:

static foreach (entry; ["foo", "bar", "baz"])
{
  unittest
  {
    writeln(entry);
  }
}

foo
foo
foo

which happened because all three unittest blocks had the same identifier, based
on line number.

--


More information about the Digitalmars-d-bugs mailing list