From d-bugmail at puremagic.com Thu Oct 1 08:33:47 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 01 Oct 2020 08:33:47 +0000 Subject: [Issue 21288] New: Wrong context pointer for alias this function Message-ID: https://issues.dlang.org/show_bug.cgi?id=21288 Issue ID: 21288 Summary: Wrong context pointer for alias this function Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: rmanth at gmail.com struct A { int p; } struct B { A a() { return A.init; } alias a this; } struct C { void foo() { static assert(B.p.stringof == "p"); // Error: this for s needs to be type B not type C } } void foo() { static assert(B.p.stringof == "p"); // totally fine } -- From d-bugmail at puremagic.com Thu Oct 1 10:11:06 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 01 Oct 2020 10:11:06 +0000 Subject: [Issue 21288] Wrong context pointer for alias this function In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21288 Mathias LANG changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pro.mathias.lang at gmail.com --- Comment #1 from Mathias LANG --- Wait, is this code even valid ? Here in `C.foo` & `foo` you are calling `B.p`, as a shortcut for `B.a.p`, but `a()` is not static, hence you should not be able to do that. Indeed if you change the expression to `B.a.p` it gives you a proper error message. So the second case is an accept-invalid, and the first case could use with a better error message. -- From d-bugmail at puremagic.com Thu Oct 1 10:32:57 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 01 Oct 2020 10:32:57 +0000 Subject: [Issue 21285] Delegate covariance broken between 2.092 and 2.094 (git master). In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21285 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #2 from Dlang Bot --- @Biotronic created dlang/dmd pull request #11819 "Fix Issue 21285 - Delegate covariance broken between 2.092 and 2.094 (git master)." fixing this issue: - Fix Issue 21285 - Delegate covariance broken between 2.092 and 2.094 (git master) https://github.com/dlang/dmd/pull/11819 -- From d-bugmail at puremagic.com Thu Oct 1 10:57:40 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 01 Oct 2020 10:57:40 +0000 Subject: [Issue 21288] Wrong context pointer for alias this function In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21288 --- Comment #2 from Richard Manthorpe --- It feels like it should be valid. If there is an `alias this` you should really have to know whether something is in `B` or `A`. Since you can do things like `A.p.stringof` or `__traits(getAttributes, A.p)` which requires a symbol, you should probably also be able to do `B.p.stringof` or `__traits(getAttributes, B.p)`. -- From d-bugmail at puremagic.com Fri Oct 2 14:14:41 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 02 Oct 2020 14:14:41 +0000 Subject: [Issue 19590] __traits allMembers should put fully qualified names for imports In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=19590 Steven Schveighoffer changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |schveiguy at yahoo.com Resolution|FIXED |--- --- Comment #4 from Steven Schveighoffer --- Fix was reverted. I've reopened for now. But I strongly believe you shouldn't see imports at all in the __traits(allMembers) result. Perhaps if they are renamed imports, because now you have a local alias for it. Is there a use case to being able to get the imports? If so, perhaps a new __traits is needed. -- From d-bugmail at puremagic.com Fri Oct 2 14:49:15 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 02 Oct 2020 14:49:15 +0000 Subject: [Issue 21250] dirEntries on non-existent directory causes assert error In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21250 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #5 from Dlang Bot --- dlang/phobos pull request #7646 "Issue 21250 - dirEntries on non-existent directory causes assert error" was merged into stable: - b9e20a58953950e92fb19a397f77fa90e1461395 by Andrei Alexandrescu: Fix Issue 21250 - dirEntries on non-existent directory causes assert error https://github.com/dlang/phobos/pull/7646 -- From d-bugmail at puremagic.com Fri Oct 2 19:38:50 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 02 Oct 2020 19:38:50 +0000 Subject: [Issue 21288] Wrong context pointer for alias this function In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21288 --- Comment #3 from Mathias LANG --- Right, because it's `stringof`. Just tested and it also trigggers with `__traits(identifier)`. A workaround for this issue would be to use the following: ``` static assert(__traits(identifier, typeof(B.init.a()).p) == "p"); ``` Which works as expected. -- From d-bugmail at puremagic.com Sat Oct 3 03:58:00 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 03 Oct 2020 03:58:00 +0000 Subject: [Issue 20655] [REG: 2.072] attribute inference accepts unsafe union access as @safe In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20655 Steven Schveighoffer changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |schveiguy at yahoo.com Summary|attribute inference accepts |[REG: 2.072] attribute |unsafe union access as |inference accepts unsafe |@safe |union access as @safe Severity|normal |regression --- Comment #7 from Steven Schveighoffer --- This is a regression since 2.072. Upping importance, this regression is 4 years old! -- From d-bugmail at puremagic.com Sat Oct 3 09:56:09 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 03 Oct 2020 09:56:09 +0000 Subject: [Issue 20905] Type definition inside a static if results in an undefined identifier In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20905 KytoDragon changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|An alias inside a static if |Type definition inside a |results in an undefined |static if results in an |identifier in some |undefined identifier |situations | -- From d-bugmail at puremagic.com Sat Oct 3 09:55:19 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 03 Oct 2020 09:55:19 +0000 Subject: [Issue 20905] An alias inside a static if results in an undefined identifier in some situations In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20905 --- Comment #2 from KytoDragon --- It turns out you don't even need an alias for it to fail: struct Bar { Foo foo; } static if (true) { struct my_type { int a; } } struct Foo { my_type index; } test.d(12): Error: undefined identifier `my_type` -- From d-bugmail at puremagic.com Sun Oct 4 06:53:46 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 04 Oct 2020 06:53:46 +0000 Subject: [Issue 21289] New: [The D Bug Tracker] "File does not exist" FileException on c:\hiberfil.sys Message-ID: https://issues.dlang.org/show_bug.cgi?id=21289 Issue ID: 21289 Summary: [The D Bug Tracker] "File does not exist" FileException on c:\hiberfil.sys Product: D Version: D2 Hardware: x86_64 URL: http://dlang.org/ OS: Windows Status: NEW Severity: normal Priority: P3 Component: dlang.org Assignee: nobody at puremagic.com Reporter: vital.fadeev at gmail.com Created attachment 1805 --> https://issues.dlang.org/attachment.cgi?id=1805&action=edit file "File does not exist" FileException on existent file: c:\hiberfil.sys Source code: import std.stdio; void main() { import std.file : DirEntry; writeln( DirEntry( "c:\\hiberfil.sys" ).isDir() ); } I expected "false". Not FileException. Because "c:\\hiberfil.sys" is exist. -- From d-bugmail at puremagic.com Sun Oct 4 07:30:13 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 04 Oct 2020 07:30:13 +0000 Subject: [Issue 21289] [The D Bug Tracker] "File does not exist" FileException on c:\hiberfil.sys In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21289 --- Comment #1 from Vital --- I look into the std.file... function "existsImpl()"... ... version (Windows) { // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ // fileio/base/getfileattributes.asp return GetFileAttributesW(namez) != 0xFFFFFFFF; // INVALID_FILE_ATTRIBUTES } ... existsImpl() functions return "false" on file "c:\\hiberfil.sys". Because INVALID_FILE_ATTRIBUTES. It not correct? because file exists. I tried several ways: GetFileAttributesW(), GetFileAttributesExW(), FindFirstFileW(). Working solution : WIN32_FIND_DATAW fd; auto hFind = FindFirstFile ( "c:\\hiberfil.sys", &fd ); if ( hFind != INVALID_HANDLE_VALUE ) { writeln( "[ OK ]" ); FindClose( hFind ); } Of course solution above is a little slower than GetFileAttributes(), but work correct with .sys files. I will suggest using "FindFirstFileW()" in the "std.file: existsImpl()" there is no better solution yet. -- From d-bugmail at puremagic.com Sun Oct 4 15:19:55 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 04 Oct 2020 15:19:55 +0000 Subject: [Issue 21289] [The D Bug Tracker] "File does not exist" FileException on c:\hiberfil.sys In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21289 --- Comment #2 from Vital --- Created attachment 1806 --> https://issues.dlang.org/attachment.cgi?id=1806&action=edit std-file-dirEnrty-windows.patch -- From d-bugmail at puremagic.com Sun Oct 4 15:20:06 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 04 Oct 2020 15:20:06 +0000 Subject: [Issue 21289] [The D Bug Tracker] "File does not exist" FileException on c:\hiberfil.sys In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21289 --- Comment #3 from Vital --- I fix bug. Check the patch. I will be happy when it will be committed in next version. std-file-dirEnrty-windows.patch ( see attached .patch in ticket ) -- From d-bugmail at puremagic.com Sun Oct 4 15:22:59 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 04 Oct 2020 15:22:59 +0000 Subject: [Issue 21289] [The D Bug Tracker] "File does not exist" FileException on c:\hiberfil.sys In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21289 --- Comment #4 from Vital --- FindFirstFileW() can read attributes of system locked files. I used it. -- From d-bugmail at puremagic.com Sun Oct 4 15:28:53 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 04 Oct 2020 15:28:53 +0000 Subject: [Issue 21289] [The D Bug Tracker] "File does not exist" FileException on c:\hiberfil.sys In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21289 --- Comment #5 from Vital --- Created attachment 1807 --> https://issues.dlang.org/attachment.cgi?id=1807&action=edit fixed std.file.exists() Using FindFirstFile() for check file existens under Windows. Because correct work with system locked files: like a c:\hiberfil.sys -- From d-bugmail at puremagic.com Sun Oct 4 16:05:25 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 04 Oct 2020 16:05:25 +0000 Subject: [Issue 21290] New: [REG2.092] Incorrect escape deprecation on scope lazy pointer parameter Message-ID: https://issues.dlang.org/show_bug.cgi?id=21290 Issue ID: 21290 Summary: [REG2.092] Incorrect escape deprecation on scope lazy pointer parameter Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: johanengelen at weka.io Test code: ``` void foo(scope lazy void* p); struct S { this(int a) { foo(&this); // line 5 } } ``` When compiled with dlang >= 2.092, the following deprecation message is shown: (5): Deprecation: escaping reference to outer local variable `this` The deprecation message is incorrect because of `scope` in the function parameter signature. The code compiles without deprecation message when `lazy` is removed. (This is probably because DIP25 violations now show deprecation messages, i.e. DIP25 implementation bugs now start to surface. Deprecation message bugs are as bad as error bugs, because -de is used in settings where one does not want to disable it.) -- From d-bugmail at puremagic.com Sun Oct 4 16:05:55 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 04 Oct 2020 16:05:55 +0000 Subject: [Issue 21290] [REG2.092] Incorrect escape deprecation on scope lazy pointer parameter In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21290 johanengelen at weka.io changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |industry -- From d-bugmail at puremagic.com Sun Oct 4 17:32:22 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 04 Oct 2020 17:32:22 +0000 Subject: [Issue 21290] [REG2.073] Incorrect escape deprecation on scope lazy pointer parameter In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21290 moonlightsentinel at disroot.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |moonlightsentinel at disroot.o | |rg Summary|[REG2.092] Incorrect escape |[REG2.073] Incorrect escape |deprecation on scope lazy |deprecation on scope lazy |pointer parameter |pointer parameter -- From d-bugmail at puremagic.com Sun Oct 4 17:35:53 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 04 Oct 2020 17:35:53 +0000 Subject: [Issue 21290] [REG2.073] Incorrect escape deprecation on scope lazy pointer parameter In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21290 --- Comment #1 from moonlightsentinel at disroot.org --- The actual regression happened in 2.073.2. Introduced by this PR: https://github.com/dlang/dmd/pull/6388 -- From d-bugmail at puremagic.com Sun Oct 4 18:56:11 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 04 Oct 2020 18:56:11 +0000 Subject: [Issue 21291] New: Array literal that escapes scope is allocated on stack Message-ID: https://issues.dlang.org/show_bug.cgi?id=21291 Issue ID: 21291 Summary: Array literal that escapes scope is allocated on stack Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: accepts-invalid, safe Severity: regression Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: dkorpel at live.nl I got memory corruption in @safe code because an array literal that was expected to be allocated by the Garbage Collector turned out to be put on the stack, as shown by the following @nogc code (must be compiled with -dip1000): ``` @safe: @nogc: struct S { int[] arr; static S create(int[] arr) pure @nogc { return S(arr); } } S createS() { // This should be GC allocated, but the compiler allows this // in this @nogc function and puts it on the stack! return S.create([0xABCD, 0xBCDE]); } void stompStack() { // set stack memory to reveal dangling stack pointers ubyte[128] stackMemory = 0x77; } extern(C) void main() { auto s = createS(); assert(s.arr[0] == 0xABCD); // likely still passes stompStack(); assert(s.arr[0] == 0xABCD); // likely does not pass } ``` It seems to be important that the array literal is in a pure static member function, though it might be possible to reduce the example further. This is introduced in DMD version 2.092 most likely because of https://github.com/dlang/dmd/pull/11039 though I don't think the wrong code is in that PR's code. I suspect that somewhere else in the compiler the 'return scope' flag is wrongfully inferred. -- From d-bugmail at puremagic.com Sun Oct 4 18:56:11 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 04 Oct 2020 18:56:11 +0000 Subject: [Issue 20734] Array literals as arguments to scope slice parameters should be stack-allocated In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20734 Dennis changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://issues.dlang.org/sh | |ow_bug.cgi?id=21291 -- From d-bugmail at puremagic.com Sun Oct 4 19:14:32 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 04 Oct 2020 19:14:32 +0000 Subject: [Issue 21291] Array literal that escapes scope is allocated on stack In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21291 ag0aep6g changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ag0aep6g at gmail.com --- Comment #1 from ag0aep6g --- (In reply to Dennis from comment #0) > It seems to be important that the array literal is in a pure static member > function, though it might be possible to reduce the example further. Duplicate of issue 20150? `-preview=dip1000` pretty much doesn't check `pure` functions at all, at the moment. -- From d-bugmail at puremagic.com Mon Oct 5 01:52:49 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 05 Oct 2020 01:52:49 +0000 Subject: [Issue 19590] __traits allMembers should put fully qualified names for imports In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=19590 --- Comment #5 from Basile-z --- After thinking more about the problem, I have concluded that what should be done is to add to the AST a new Dsymbol derived class called "ImportWrapper". It would solve the problem that the information that your in the "import domain" is lost and without using the FQN trick, which did not respect the fact that a sym has a single ident. class ImportWrapper : Dsymbol { this(Ident id, ImportWrapper iw, Module m) { super(id); module_ = m; next = iw; } ImportWrapper next; Module module_; override Dsymbol search(const ref Loc loc, Identifier ident, int flags = IgnoreNone) { // if .next is assigned than return whether (next.identifier == ident) // if .module_ is assisgned then forward result of module_.search() } } so that for `import std.algorithm;` `allMembers` can include "std", just as now but `getMember` on this "std" gives an ImportWrapper instance that has no `.module_` but a `.next`. `allMember` on "std" can return "algorithm". This way partial import in the chain is not lost and sub modules that are not imported by the ImportStatement are not visible. -- From d-bugmail at puremagic.com Mon Oct 5 03:32:37 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 05 Oct 2020 03:32:37 +0000 Subject: [Issue 21292] New: Chrome now blocks downloading .dmg compiler file by default Message-ID: https://issues.dlang.org/show_bug.cgi?id=21292 Issue ID: 21292 Summary: Chrome now blocks downloading .dmg compiler file by default Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: major Priority: P1 Component: dlang.org Assignee: nobody at puremagic.com Reporter: andrej.mitrovich at gmail.com Chrome has started to disallow direct download of .dmg files on MacOS. Clicking the `Download DMG File` link does nothing. If I manually right click and save it, I get a warning in Chrome saying "dmd.2.094.0.dmg can't be downloaded securely" - although it does allow me to override this. So I think the website should be updated. Perhaps to suggest using brew? -- From d-bugmail at puremagic.com Mon Oct 5 03:35:30 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 05 Oct 2020 03:35:30 +0000 Subject: [Issue 21292] Chrome now blocks downloading .dmg compiler file by default In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21292 --- Comment #1 from Andrej Mitrovic --- I was just told that brew is mentioned on the "Other Downloads" page here: https://dlang.org/download.html Although I think we should probably move this to the main page for MacOS. -- From d-bugmail at puremagic.com Mon Oct 5 03:45:58 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 05 Oct 2020 03:45:58 +0000 Subject: [Issue 21292] Chrome now blocks downloading .dmg compiler file by default In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21292 Mathias LANG changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pro.mathias.lang at gmail.com --- Comment #2 from Mathias LANG --- It is not `dmg`, since Chrome allows to download a dmg from https://www.google.com/chrome/ . I think it's the fact that the download link is using http rather than https. -- From d-bugmail at puremagic.com Mon Oct 5 08:09:27 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 05 Oct 2020 08:09:27 +0000 Subject: [Issue 21283] [C++] Wrong mangling for ref of parameter pack In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21283 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Dlang Bot --- @BorisCarvajal updated dlang/dmd pull request #11822 "Fix Issue 21283 - [C++] Wrong mangling for ref of parameter pack" fixing this issue: - Fix Issue 21283 - [C++] Wrong mangling for ref of parameter pack https://github.com/dlang/dmd/pull/11822 -- From d-bugmail at puremagic.com Mon Oct 5 09:11:15 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 05 Oct 2020 09:11:15 +0000 Subject: [Issue 21283] [C++] Wrong mangling for ref of parameter pack In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21283 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Dlang Bot --- dlang/dmd pull request #11822 "Fix Issue 21283 - [C++] Wrong mangling for ref of parameter pack" was merged into stable: - 6b451bc94690a32c96e897020d44029f7f803f7f by Boris Carvajal: Fix Issue 21283 - [C++] Wrong mangling for ref of parameter pack https://github.com/dlang/dmd/pull/11822 -- From d-bugmail at puremagic.com Mon Oct 5 09:59:28 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 05 Oct 2020 09:59:28 +0000 Subject: [Issue 20752] __traits(isReturnOnStack, func) is incomplete and can't be trusted In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20752 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla at digitalmars.com --- Comment #3 from Walter Bright --- > the following compiles and triggers the assert with DMD: A much smaller example would be nice. For example, all those templates seem an unnecessary complication. -- From d-bugmail at puremagic.com Mon Oct 5 10:17:36 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 05 Oct 2020 10:17:36 +0000 Subject: [Issue 21203] Accept pragma(mangle) on aggregate types In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21203 Nicholas Wilson changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |iamthewilsonator at hotmail.co | |m --- Comment #5 from Nicholas Wilson --- Runnable example: template ScopeClass(C) // if (is(C == class)) { static if (__traits(getLinkage, C) == "C++") { extern(C++, class) pragma(mangle, C.mangleof) // <- here's the magic! struct ScopeClass { char[__traits(classInstanceSize, C)] buffer; //... all the things ... } } } extern(C++): class MyClass {} void funa(MyClass); // mangles MyClass* void funb(const MyClass); // mangles const MyClass* const void func(ScopeClass!MyClass); // mangles MyClass void fund(const ScopeClass!MyClass); // mangles const MyClass void fune(ref ScopeClass!MyClass); // mangles MyClass& void funf(ref const ScopeClass!MyClass); // mangles const MyClass& void fung(const(ScopeClass!MyClass)*); // currently prints pragma(msg,funa.mangleof); // _Z4funaP7MyClass pragma(msg,funb.mangleof); // _Z4funbPK7MyClass pragma(msg,func.mangleof); // _Z4func10ScopeClassIP7MyClassE pragma(msg,fund.mangleof); // _Z4fund10ScopeClassIP7MyClassE pragma(msg,fune.mangleof); // _Z4funeR10ScopeClassIP7MyClassE pragma(msg,funf.mangleof); // _Z4funfRK10ScopeClassIP7MyClassE pragma(msg,fung.mangleof); // _Z4fungPK10ScopeClassIP7MyClassE -- From d-bugmail at puremagic.com Mon Oct 5 12:29:36 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 05 Oct 2020 12:29:36 +0000 Subject: [Issue 21289] [The D Bug Tracker] "File does not exist" FileException on c:\hiberfil.sys In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21289 --- Comment #6 from Vital --- Created attachment 1808 --> https://issues.dlang.org/attachment.cgi?id=1808&action=edit fix std.file.exists and std.file.DirEntry Windows version for system locked files and Windows root paths Latest version patch. Includes all previous patches. fix: - std.file.exists - std.file.DirEntry Windows version for system locked files - Windows root paths attributes -- From d-bugmail at puremagic.com Mon Oct 5 18:26:05 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 05 Oct 2020 18:26:05 +0000 Subject: [Issue 21293] New: cxx-headers-test build target segfaults Message-ID: https://issues.dlang.org/show_bug.cgi?id=21293 Issue ID: 21293 Summary: cxx-headers-test build target segfaults Product: D Version: D2 Hardware: x86_64 OS: Mac OS X Status: NEW Severity: major Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: doob at me.com Running `./src/build.d cxx-headers-test` results in a segmentation fault on macOS. Is the invocation of DMD that fails. Running the DMD command (which is printed when `./src/build.d cxx-headers-test`) inside a debugger results in this stacktrace: (lldb) r Process 40315 launched: 'dlang/dmd/generated/osx/release/64/dmd' (x86_64) Process 40315 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) frame #0: 0x000000010012b43c dmd`_D3dmd4root5array__T5ArrayTCQBa7dsymbol7DsymbolZQBc7opSliceMNgFNaNbNiNfZANgCQCwQBwQBr at array.d:305 302 303 extern (D) inout(T)[] opSlice() inout nothrow pure @nogc 304 { -> 305 return data[0 .. length]; 306 } 307 308 extern (D) inout(T)[] opSlice(size_t a, size_t b) inout nothrow pure @nogc Target 0: (dmd) stopped. (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) * frame #0: 0x000000010012b43c dmd`_D3dmd4root5array__T5ArrayTCQBa7dsymbol7DsymbolZQBc7opSliceMNgFNaNbNiNfZANgCQCwQBwQBr at array.d:305 frame #1: 0x00000001000bb603 dmd`ToCppBuffer::visit(EnumDeclaration*) at dtoh.d:1252 frame #2: 0x000000010005044a dmd`EnumDeclaration::accept(Visitor*) at denum.d:367 frame #3: 0x00000001000bc395 dmd`ToCppBuffer::visit(TypeEnum*) at dtoh.d:1497 frame #4: 0x000000010017349a dmd`TypeEnum::accept(Visitor*) at mtype.d:6241 frame #5: 0x00000001000bcfe7 dmd`ToCppBuffer::funcToBuffer(TypeFunction*, FuncDeclaration*) at dtoh.d:1734 frame #6: 0x00000001000b9432 dmd`ToCppBuffer::visit(FuncDeclaration*) at dtoh.d:579 frame #7: 0x0000000100103e1a dmd`FuncDeclaration::accept(Visitor*) at func.d:2569 frame #8: 0x00000001000bb1e3 dmd`ToCppBuffer::visit(ClassDeclaration*) at dtoh.d:1157 frame #9: 0x000000010004a1aa dmd`ClassDeclaration::accept(Visitor*) at dclass.d:982 frame #10: 0x00000001000badd7 dmd`ToCppBuffer::includeSymbol(Dsymbol*) at dtoh.d:1095 frame #11: 0x00000001000bb0b0 dmd`ToCppBuffer::visit(ClassDeclaration*) at dtoh.d:1136 frame #12: 0x000000010004a1aa dmd`ClassDeclaration::accept(Visitor*) at dclass.d:982 frame #13: 0x00000001000badd7 dmd`ToCppBuffer::includeSymbol(Dsymbol*) at dtoh.d:1095 frame #14: 0x00000001000bb0b0 dmd`ToCppBuffer::visit(ClassDeclaration*) at dtoh.d:1136 frame #15: 0x000000010004a1aa dmd`ClassDeclaration::accept(Visitor*) at dclass.d:982 frame #16: 0x00000001000b8e6c dmd`ToCppBuffer::visit(AttribDeclaration*) at dtoh.d:456 frame #17: 0x00000001001a209f dmd`ParseTimeVisitor::visit(StorageClassDeclaration*) at parsetimevisitor.d:77 frame #18: 0x00000001000137d2 dmd`StorageClassDeclaration::accept(Visitor*) at attrib.d:324 frame #19: 0x00000001000b8e6c dmd`ToCppBuffer::visit(AttribDeclaration*) at dtoh.d:456 frame #20: 0x00000001000b8f10 dmd`ToCppBuffer::visit(LinkDeclaration*) at dtoh.d:479 frame #21: 0x0000000100013ae2 dmd`LinkDeclaration::accept(Visitor*) at attrib.d:432 frame #22: 0x00000001000b8fe0 dmd`ToCppBuffer::visit(Module*) at dtoh.d:503 frame #23: 0x00000001000704ca dmd`Module::accept(Visitor*) at dmodule.d:1485 frame #24: 0x00000001000b86ab dmd`genCppHdrFiles(Array&) at dtoh.d:245 frame #25: 0x000000010015e17b dmd`_D3dmd4mars7tryMainFmPPxaKSQz7globals5ParamZi at mars.d:674 frame #26: 0x000000010015f1e5 dmd`_Dmain at mars.d:972 frame #27: 0x000000010031e837 dmd`_D2rt6dmain212_d_run_main2UAAamPUQgZiZ6runAllMFZ9__lambda1MFZv + 31 frame #28: 0x000000010031e6e1 dmd`_D2rt6dmain212_d_run_main2UAAamPUQgZiZ7tryExecMFMDFZvZv + 33 frame #29: 0x000000010031e7bb dmd`_D2rt6dmain212_d_run_main2UAAamPUQgZiZ6runAllMFZv + 139 frame #30: 0x000000010031e6e1 dmd`_D2rt6dmain212_d_run_main2UAAamPUQgZiZ7tryExecMFMDFZvZv + 33 frame #31: 0x000000010031e64a dmd`_d_run_main2 + 626 frame #32: 0x000000010031e3c2 dmd`_d_run_main + 190 frame #33: 0x0000000100004360 dmd`main at mars.d:925 frame #34: 0x00007fff71f31cc9 libdyld.dylib`start + 1 -- From d-bugmail at puremagic.com Mon Oct 5 19:55:34 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 05 Oct 2020 19:55:34 +0000 Subject: [Issue 21293] dtoh: segfault when building cxx-headers In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21293 moonlightsentinel at disroot.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |moonlightsentinel at disroot.o | |rg Summary|cxx-headers-test build |dtoh: segfault when |target segfaults |building cxx-headers -- From d-bugmail at puremagic.com Mon Oct 5 19:55:55 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 05 Oct 2020 19:55:55 +0000 Subject: [Issue 21293] dtoh: segfault when building cxx-headers on MacOS In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21293 moonlightsentinel at disroot.org changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|dtoh: segfault when |dtoh: segfault when |building cxx-headers |building cxx-headers on | |MacOS -- From d-bugmail at puremagic.com Mon Oct 5 22:55:07 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 05 Oct 2020 22:55:07 +0000 Subject: [Issue 21294] New: [Regression: DMD fails to link since PR11743 Message-ID: https://issues.dlang.org/show_bug.cgi?id=21294 Issue ID: 21294 Summary: [Regression: DMD fails to link since PR11743 Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: ibuclaw at gdcproject.org -- From d-bugmail at puremagic.com Mon Oct 5 22:56:37 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 05 Oct 2020 22:56:37 +0000 Subject: [Issue 21294] [REG 2.095]: DMD fails to link since PR11743 In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21294 Iain Buclaw changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ibuclaw at gdcproject.org Summary|[Regression: DMD fails to |[REG 2.095]: DMD fails to |link since PR11743 |link since PR11743 -- From d-bugmail at puremagic.com Mon Oct 5 22:59:50 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 05 Oct 2020 22:59:50 +0000 Subject: [Issue 21294] [REG 2.095]: DMD fails to link since PR11743 In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21294 --- Comment #1 from Iain Buclaw --- ld: d/func.o: in function `dmd.root.stringtable.StringTable!(dmd.mtype.Type).StringTable.findSlot(ulong, const(char)[]) const': dmd/root/stringtable.d:285: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.toDchars() const' ld: /build/gcc/d/dmd/root/stringtable.d:285: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.toDchars() const' ld: /build/gcc/d/dmd/root/stringtable.d:285: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.toDchars() const' ld: d/func.o: in function `dmd.root.stringtable.StringTable!(dmd.mtype.Type).StringTable.allocValue(const(char)[], dmd.mtype.Type)': dmd/root/stringtable.d:261: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.lstring()' ld: /build/gcc/d/dmd/root/stringtable.d:262: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.lstring()' ld: d/func.o: in function `dmd.root.stringtable.StringTable!(dmd.mtype.Type).StringTable.grow()': dmd/root/stringtable.d:303: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.toString() inout' ld: d/func.o: in function `dmd.root.stringtable.StringTable!(dmd.mtype.Type).StringTable.findSlot(ulong, const(char)[]) const': dmd/root/stringtable.d:285: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.toDchars() const' ld: /build/gcc/d/dmd/root/stringtable.d:285: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.toDchars() const' ld: d/func.o: in function `dmd.root.stringtable.StringTable!(dmd.mtype.Type).StringTable.grow()': dmd/root/stringtable.d:303: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.toString() inout' ld: d/func.o: in function `dmd.root.stringtable.StringTable!(dmd.mtype.Type).StringTable.allocValue(const(char)[], dmd.mtype.Type)': dmd/root/stringtable.d:261: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.lstring()' ld: /build/gcc/d/dmd/root/stringtable.d:262: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.lstring()' ld: d/func.o: in function `dmd.root.stringtable.StringTable!(dmd.mtype.Type).StringTable.findSlot(ulong, const(char)[]) const': dmd/root/stringtable.d:285: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.toDchars() const' ld: d/func.o: in function `dmd.root.stringtable.StringTable!(dmd.mtype.Type).StringTable.allocValue(const(char)[], dmd.mtype.Type)': dmd/root/stringtable.d:261: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.lstring()' ld: /build/gcc/d/dmd/root/stringtable.d:262: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.lstring()' ld: d/func.o: in function `dmd.root.stringtable.StringTable!(dmd.mtype.Type).StringTable.grow()': dmd/root/stringtable.d:303: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.toString() inout' ld: d/func.o: in function `dmd.root.stringtable.StringTable!(dmd.mtype.Type).StringTable.findSlot(ulong, const(char)[]) const': dmd/root/stringtable.d:285: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.toDchars() const' ld: /build/gcc/d/dmd/root/stringtable.d:285: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.toDchars() const' ld: d/func.o: in function `dmd.root.stringtable.StringTable!(dmd.mtype.Type).StringTable.allocValue(const(char)[], dmd.mtype.Type)': dmd/root/stringtable.d:261: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.lstring()' ld: /build/gcc/d/dmd/root/stringtable.d:262: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.lstring()' ld: d/func.o: in function `dmd.root.stringtable.StringTable!(dmd.mtype.Type).StringTable.grow()': dmd/root/stringtable.d:303: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.toString() inout' ld: d/func.o: in function `dmd.root.stringtable.StringTable!(dmd.mtype.Type).StringTable.findSlot(ulong, const(char)[]) const': dmd/root/stringtable.d:285: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.toDchars() const' ld: /build/gcc/d/dmd/root/stringtable.d:285: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.toDchars() const' ld: d/func.o: in function `dmd.root.stringtable.StringTable!(dmd.mtype.Type).StringTable.allocValue(const(char)[], dmd.mtype.Type)': dmd/root/stringtable.d:261: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.lstring()' ld: /build/gcc/d/dmd/root/stringtable.d:262: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.lstring()' ld: d/func.o: in function `dmd.root.stringtable.StringTable!(dmd.mtype.Type).StringTable.grow()': dmd/root/stringtable.d:303: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.toString() inout' ld: d/func.o: in function `dmd.root.stringtable.StringTable!(dmd.mtype.Type).StringTable.findSlot(ulong, const(char)[]) const': dmd/root/stringtable.d:285: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.toDchars() const' ld: d/mtype.o: in function `dmd.root.stringtable.StringTable!(dmd.mtype.Type).StringTable.findSlot(ulong, const(char)[]) const': dmd/root/stringtable.d:285: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.toDchars() const' ld: d/typesem.o: in function `dmd.typesem.merge(dmd.mtype.Type)': dmd/gcc/../../gcc/d/dmd/typesem.d:2122: undefined reference to `dmd.root.stringtable.StringValue!(dmd.mtype.Type).StringValue.toDchars() const' collect2: error: ld returned 1 exit status -- From d-bugmail at puremagic.com Mon Oct 5 23:01:06 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 05 Oct 2020 23:01:06 +0000 Subject: [Issue 21294] [REG 2.095]: DMD fails to link since PR11743 In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21294 --- Comment #2 from Iain Buclaw --- Reverting the removal of imports in https://github.com/dlang/dmd/pull/11743 fixes the link error. -- From d-bugmail at puremagic.com Tue Oct 6 03:04:19 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 06 Oct 2020 03:04:19 +0000 Subject: [Issue 21294] [REG 2.095]: DMD fails to link since PR11743 In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21294 RazvanN changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |razvan.nitu1305 at gmail.com --- Comment #3 from RazvanN --- Which imports exactly are you referring to? Also, how can we reproduce this? -- From d-bugmail at puremagic.com Tue Oct 6 08:52:54 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 06 Oct 2020 08:52:54 +0000 Subject: [Issue 21294] [REG 2.095]: DMD fails to link since PR11743 In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21294 --- Comment #4 from Iain Buclaw --- (In reply to RazvanN from comment #3) > Which imports exactly are you referring to? It looks like a single import is the trigger over whether StringValue!Type is emitted or not. import dmd.dscope; Adding this back to dmd/aliasthis.d fixes the stage1 bootstrap. Currently running stage2 bootstrap. Without the import, this outputs nothing, and leaves undefined symbol references to StringValue!(Type).toDchars and others. $ gdc -fno-PIE -c -g -O2 -fversion=IN_GCC -frelease -fPIC -Wall -Wdeprecated -o d/mtype.o -MT d/mtype.o -MMD -MP -MF d/.deps/mtype.TPo -I../../gcc/d -J../../gcc/d/dmd -J../../gcc/d/dmd/res ../../gcc/d/dmd/mtype.d -v 2>&1 | grep StringValue $ nm d/mtype.o | grep StringValue8toDchars U _D3dmd4root11stringtable34__T11StringValueTC3dmd5mtype4TypeZ11StringValue8toDcharsMxFNaNbNiNjZPxa With the import however. $ gdc -fno-PIE -c -g -O2 -fversion=IN_GCC -frelease -fPIC -Wall -Wdeprecated -o d/mtype.o -MT d/mtype.o -MMD -MP -MF d/.deps/mtype.TPo -I../../gcc/d -J../../gcc/d/dmd -J../../gcc/d/dmd/res ../../gcc/d/dmd/mtype.d -v 2>&1 | grep StringValue function dmd.root.stringtable.StringValue!(Type).StringValue.lstring function dmd.root.stringtable.StringValue!(Type).StringValue.len function dmd.root.stringtable.StringValue!(Type).StringValue.toDchars function dmd.root.stringtable.StringValue!(Type).StringValue.toString function dmd.root.stringtable.StringValue!(Type).StringValue.__xopEquals function dmd.root.stringtable.StringValue!(Type).StringValue.__xtoHash $ nm d/mtype.o | grep StringValue8toDchars 0000000000000000 W _D3dmd4root11stringtable34__T11StringValueTC3dmd5mtype4TypeZ11StringValue8toDcharsMxFNaNbNiNjZPxa -- From d-bugmail at puremagic.com Tue Oct 6 09:02:18 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 06 Oct 2020 09:02:18 +0000 Subject: [Issue 21294] [REG 2.095]: DMD fails to link since PR11743 In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21294 --- Comment #5 from Iain Buclaw --- (In reply to RazvanN from comment #3) > Also, how can we reproduce this? It looks like DMD is in a worse state, a simple reproducer script shows that reverting the PR doesn't help DMD at all (using v2.091.1 as host compiler). ``` #!/bin/bash mkdir -p build echo "/etc" > build/SYSCONFDIR.imp echo "v2.094.0" > build/VERSION for dir in . root backend; do mkdir -p build/${dir} for src in src/dmd/${dir}/*.d; do echo dmd -version=MARS -I=src -J=src/dmd/res -J=build -c -od=build/${dir} ${src} dmd -version=MARS -I=src -J=src/dmd/res -J=build -c -od=build/${dir} ${src} done done echo dmd build/*.o build/root/*.o build/backend/*.o -of=build/dmd dmd build/*.o build/root/*.o build/backend/*.o -of=build/dmd echo =================== dmd --version ``` -- From d-bugmail at puremagic.com Tue Oct 6 09:07:57 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 06 Oct 2020 09:07:57 +0000 Subject: [Issue 21294] [REG 2.095]: DMD fails to link since PR11743 In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21294 --- Comment #6 from Iain Buclaw --- Slightly tweaked for some added parallelism for bisecting dmd. I'll see if there's a first good commit with dmd. ``` #!/bin/bash if [ -d build ]; then rm -r build; fi mkdir build echo "/etc" > build/SYSCONFDIR.imp echo "v2.000.0" > build/VERSION for dir in . root backend; do mkdir -p build/${dir} for src in src/dmd/${dir}/*.d; do echo dmd -version=MARS -I=src -J=src/dmd/res -J=build \ -c -od=build/${dir} ${src} dmd -version=MARS -I=src -J=src/dmd/res -J=build \ -c -od=build/${dir} ${src} & sleep 0.05 done done echo dmd build/*.o build/root/*.o build/backend/*.o -of=build/dmd dmd build/*.o build/root/*.o build/backend/*.o -of=build/dmd echo ========================= dmd --version -- From d-bugmail at puremagic.com Tue Oct 6 09:18:51 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 06 Oct 2020 09:18:51 +0000 Subject: [Issue 21294] [REG 2.095]: DMD fails to link since PR11743 In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21294 --- Comment #7 from Iain Buclaw --- When building 2.092.1 using dmd as host compiler, it still fails to link due to missing StringValue!(Symbol).toDchars, but the missing StringValue!(Type) is now gone. ((v2.092.1)|BISECTING) $ nm build/mtype.o | grep _D3dmd4root11stringtable__T11StringValueTCQBo5mtype4TypeZQBe8toDcharsMxFNaNbNiNjZPxa 0000000000000000 W _D3dmd4root11stringtable__T11StringValueTCQBo5mtype4TypeZQBe8toDcharsMxFNaNbNiNjZPxa ((v2.092.1)|BISECTING) $ nm build/typesem.o | grep _D3dmd4root11stringtable__T11StringValueTCQBo5mtype4TypeZQBe8toDcharsMxFNaNbNiNjZPxa U _D3dmd4root11stringtable__T11StringValueTCQBo5mtype4TypeZQBe8toDcharsMxFNaNbNiNjZPxa -- From d-bugmail at puremagic.com Tue Oct 6 09:28:49 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 06 Oct 2020 09:28:49 +0000 Subject: [Issue 21294] [REG 2.095]: DMD fails to link since PR11743 In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21294 --- Comment #8 from Iain Buclaw --- The first bad commit for dmd was https://github.com/dlang/dmd/pull/11083 Adding the import of stringtable in that PR now means that all modules think it's OK to omit generating code for StringValue!(Type). ((9fa18aa20...)|BISECTING) $ nm build/func.o | grep _D3dmd4root11stringtable__T11StringValueTCQBo5mtype4TypeZQBe8toDcharsMxFNaNbNiNjZPxa U _D3dmd4root11stringtable__T11StringValueTCQBo5mtype4TypeZQBe8toDcharsMxFNaNbNiNjZPxa ((9fa18aa20...)|BISECTING) $ nm build/typesem.o | grep _D3dmd4root11stringtable__T11StringValueTCQBo5mtype4TypeZQBe8toDcharsMxFNaNbNiNjZPxa U _D3dmd4root11stringtable__T11StringValueTCQBo5mtype4TypeZQBe8toDcharsMxFNaNbNiNjZPxa ((9fa18aa20...)|BISECTING) $ nm build/mtype.o | grep _D3dmd4root11stringtable__T11StringValueTCQBo5mtype4TypeZQBe8toDcharsMxFNaNbNiNjZPxa U _D3dmd4root11stringtable__T11StringValueTCQBo5mtype4TypeZQBe8toDcharsMxFNaNbNiNjZPxa -- From d-bugmail at puremagic.com Tue Oct 6 09:42:01 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 06 Oct 2020 09:42:01 +0000 Subject: [Issue 21294] [REG 2.095]: DMD fails to link since PR11743 In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21294 --- Comment #9 from Iain Buclaw --- (In reply to Iain Buclaw from comment #8) > The first bad commit for dmd was https://github.com/dlang/dmd/pull/11083 > > Adding the import of stringtable in that PR now means that all modules think > it's OK to omit generating code for StringValue!(Type). > Adding -allinst does not help either. ``` #!/bin/bash # Toggle testing using -allinst dflags="-allinst" if [ -d build ]; then rm -r build; fi mkdir build echo "/etc" > build/SYSCONFDIR.imp echo "v2.000.0" > build/VERSION echo "" > build/default_ddoc_theme.ddoc for dir in . root backend; do mkdir -p build/${dir} for src in src/dmd/${dir}/*.d; do echo dmd ${dflags} -version=MARS -I=src -J=src/dmd/res -J=build \ -c -od=build/${dir} ${src} dmd ${dflags} -version=MARS -I=src -J=src/dmd/res -J=build \ -c -od=build/${dir} ${src} & sleep 0.05 done done wait echo dmd build/backend/*.o build/root/*.o build/*.o -of=build/dmd dmd build/backend/*.o build/root/*.o build/*.o -of=build/dmd echo ========================= dmd --version ``` -- From d-bugmail at puremagic.com Tue Oct 6 12:39:29 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 06 Oct 2020 12:39:29 +0000 Subject: [Issue 21294] [REG 2.095]: DMD fails to link since PR11743 In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21294 --- Comment #10 from Iain Buclaw --- Although re-adding the dscope import fixes the bootstrap and build for gdc. Counter-intuitively, removing *more* imports appears to fix the issue for dmd. I see StringValue!Type being generated after removing unused imports from access.d, aggregate.d, arrayop.d, canthrow.d, compiler.d, and cond.d. $ dmd -version=MARS -I=src -J=src/dmd/res -J=build -c -od=build/. src/dmd/./mtype.d -v | grep StringV function dmd.root.stringtable.StringValue!(Type).StringValue.lstring function dmd.root.stringtable.StringValue!(Type).StringValue.len function dmd.root.stringtable.StringValue!(Type).StringValue.toDchars function dmd.root.stringtable.StringValue!(Type).StringValue.toString function dmd.root.stringtable.StringValue!(Type).StringValue.__xopEquals function dmd.root.stringtable.StringValue!(Type).StringValue.__xtoHash -- From d-bugmail at puremagic.com Tue Oct 6 14:10:52 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 06 Oct 2020 14:10:52 +0000 Subject: [Issue 21295] New: [REG] Symbol lookup/resolve in compilation broken in D Message-ID: https://issues.dlang.org/show_bug.cgi?id=21295 Issue ID: 21295 Summary: [REG] Symbol lookup/resolve in compilation broken in D Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: ibuclaw at gdcproject.org Apply this patch against dmd. --- diff --git a/src/dmd/cond.d b/src/dmd/cond.d index 22387072e..0fec9d421 100644 --- a/src/dmd/cond.d +++ b/src/dmd/cond.d @@ -32,7 +32,7 @@ import dmd.root.rootobject; import dmd.root.string; import dmd.tokens; import dmd.utils; -import dmd.visitor; +//import dmd.visitor; import dmd.id; import dmd.statement; import dmd.declaration; --- And it compiles without any issue. Compile dmd/cond.d individually though, and it's another matter. $ dmd -version=MARS -I=src -J=. -J=src/dmd/res -c src/dmd/cond.d src/dmd/cond.d(82): Error: undefined identifier Visitor src/dmd/cond.d(499): Error: undefined identifier Visitor src/dmd/cond.d(557): Error: function dmd.cond.DebugCondition.include does not override any function src/dmd/cond.d(588): Error: function dmd.cond.DebugCondition.isDebugCondition does not override any function src/dmd/cond.d(593): Error: undefined identifier Visitor src/dmd/cond.d(598): Error: function dmd.cond.DebugCondition.toChars does not override any function src/dmd/cond.d(831): Error: function dmd.cond.VersionCondition.include does not override any function src/dmd/cond.d(866): Error: function dmd.cond.VersionCondition.isVersionCondition does not override any function src/dmd/cond.d(871): Error: undefined identifier Visitor src/dmd/cond.d(876): Error: function dmd.cond.VersionCondition.toChars does not override any function src/dmd/cond.d(899): Error: function dmd.cond.StaticIfCondition.include does not override any function src/dmd/cond.d(941): Error: undefined identifier Visitor src/dmd/cond.d(946): Error: function dmd.cond.StaticIfCondition.toChars does not override any function -- From d-bugmail at puremagic.com Tue Oct 6 14:21:38 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 06 Oct 2020 14:21:38 +0000 Subject: [Issue 21295] [REG] Symbol lookup/resolve in compilation broken in D In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21295 Iain Buclaw changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ibuclaw at gdcproject.org --- Comment #1 from Iain Buclaw --- First commit that exposed the separate compilation error was https://github.com/dlang/dmd/pull/11743 -- From d-bugmail at puremagic.com Tue Oct 6 14:21:59 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 06 Oct 2020 14:21:59 +0000 Subject: [Issue 21295] [REG 2.095] Symbol lookup/resolve in compilation broken in D In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21295 Iain Buclaw changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[REG] Symbol lookup/resolve |[REG 2.095] Symbol |in compilation broken in D |lookup/resolve in | |compilation broken in D -- From d-bugmail at puremagic.com Tue Oct 6 14:35:47 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 06 Oct 2020 14:35:47 +0000 Subject: [Issue 21293] dtoh: segfault when encountering opaque enum In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21293 Jacob Carlborg changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|dtoh: segfault when |dtoh: segfault when |building cxx-headers on |encountering opaque enum |MacOS | -- From d-bugmail at puremagic.com Tue Oct 6 14:35:58 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 06 Oct 2020 14:35:58 +0000 Subject: [Issue 21293] dtoh: segfault when encountering opaque enum In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21293 Jacob Carlborg changed: What |Removed |Added ---------------------------------------------------------------------------- Hardware|x86_64 |All OS|Mac OS X |All -- From d-bugmail at puremagic.com Tue Oct 6 14:37:39 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 06 Oct 2020 14:37:39 +0000 Subject: [Issue 21293] dtoh: segfault when encountering opaque enum In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21293 --- Comment #1 from Jacob Carlborg --- Here's a reduced test case: echo 'enum foo;' | dmd -HC - -- From d-bugmail at puremagic.com Tue Oct 6 14:43:25 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 06 Oct 2020 14:43:25 +0000 Subject: [Issue 21295] [REG] Symbol lookup/resolve in compilation broken in D In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21295 Iain Buclaw changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[REG 2.095] Symbol |[REG] Symbol lookup/resolve |lookup/resolve in |in compilation broken in D |compilation broken in D | -- From d-bugmail at puremagic.com Tue Oct 6 14:47:38 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 06 Oct 2020 14:47:38 +0000 Subject: [Issue 21294] [REG 2.095]: DMD fails to link since PR11743 In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21294 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #11 from Dlang Bot --- @ibuclaw created dlang/dmd pull request #11827 "Issue21294" fixing this issue: - Fix Issue 21294: Workaround missing references to template StringValue!(Type) https://github.com/dlang/dmd/pull/11827 -- From d-bugmail at puremagic.com Tue Oct 6 17:17:32 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 06 Oct 2020 17:17:32 +0000 Subject: [Issue 18789] std.stdio messes up UTF conversions on output In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=18789 --- Comment #4 from Dlang Bot --- dlang/phobos pull request #6469 "fix issue 18789 - std.stdio messes up UTF conversions on output" was merged into master: - 41f78fc1e111323a5097a2f96d8e232cb27e01d1 by aG0aep6G: fix conversion from wchar to wchar_t in LockingTextWriter.put This fixes issue 18789. - e7e75cf2343bee5bae24622ef8035cde159b6c52 by aG0aep6G: add the original test case of issue 18789 ... to ensure that it doesn't throw any exceptions like it used to. https://github.com/dlang/phobos/pull/6469 -- From d-bugmail at puremagic.com Tue Oct 6 18:09:37 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 06 Oct 2020 18:09:37 +0000 Subject: [Issue 18789] std.stdio messes up UTF conversions on output In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=18789 ag0aep6g changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #5 from ag0aep6g --- (In reply to Dlang Bot from comment #4) > This fixes issue 18789. Not sure why the bot didn't pick that up. Closing as fixed. -- From d-bugmail at puremagic.com Wed Oct 7 09:34:43 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 07 Oct 2020 09:34:43 +0000 Subject: [Issue 21296] New: std.variant.Variant cannot be initialized with immutable AA Message-ID: https://issues.dlang.org/show_bug.cgi?id=21296 Issue ID: 21296 Summary: std.variant.Variant cannot be initialized with immutable AA Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: phobos Assignee: nobody at puremagic.com Reporter: ttanjo at gmail.com I confirmed this issue with dmd 2.094.0 on my WSL environment and with run.dlang.io (https://run.dlang.io/is/EI2fhc). - How to reproduce: ``` $ cat sample.d import std.variant; void main() { immutable aa = ["0":0]; auto v = Variant(aa); } $ dmd sample.d ``` - Expected behavior: The dmd command successfully compiles the source code and generates an executable file. - Actual behavior: It fails compiling with the following messages: ``` $ dmd sample.d /home/ttanjo/dlang/dmd-2.094.0/linux/bin64/../../src/phobos/std/variant.d(490): Error: cannot modify immutable expression (*zis)[args[1].get()] /home/ttanjo/dlang/dmd-2.094.0/linux/bin64/../../src/phobos/std/variant.d(707): Error: template instance std.variant.VariantN!32LU.VariantN.handler!(immutable(int[string])) error instantiating /home/ttanjo/dlang/dmd-2.094.0/linux/bin64/../../src/phobos/std/variant.d(604): instantiated from here: opAssign!(immutable(int[string])) sample.d(6): instantiated from here: __ctor!(immutable(int[string])) ``` I guess this issue is the source of the problem of Issue 13930. -- From d-bugmail at puremagic.com Wed Oct 7 10:28:43 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 07 Oct 2020 10:28:43 +0000 Subject: [Issue 21295] [REG] Symbol lookup/resolve in compilation broken in D In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21295 --- Comment #2 from Iain Buclaw --- Here is *a* reduced test, there might be more hidden issues, but this should be trivial to debug. // dmd/astcodegen; module dmd.astcodegen; struct ASTCodegen { import dmd.dtemplate; } // dmd/ast_node.d module dmd.ast_node; import dmd.visitor : Visitor; class ASTNode { void accept(Visitor); } // dmd/cond.d module dmd.cond; import dmd.ast_node; Visitor does_not_error; // <-- !!!!!!!!! // dmd/dtemplate.d module dmd.dtemplate; import dmd.ast_node; class TemplateParameter : ASTNode { } // dmd/visitor.d module dmd.visitor; import dmd.astcodegen; class Visitor { } -- From d-bugmail at puremagic.com Wed Oct 7 11:43:58 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 07 Oct 2020 11:43:58 +0000 Subject: [Issue 21295] [REG] Symbol lookup/resolve in compilation broken in D In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21295 --- Comment #3 from Dlang Bot --- @ibuclaw created dlang/dmd pull request #11829 "Issue 21295: Add test for symbol lookup/resolve in compilation broken" mentioning this issue: - Issue 21295: Add test for symbol lookup/resolve in compilation broken https://github.com/dlang/dmd/pull/11829 -- From d-bugmail at puremagic.com Wed Oct 7 12:28:47 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 07 Oct 2020 12:28:47 +0000 Subject: [Issue 21295] [REG] Symbol lookup/resolve in compilation broken in D In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21295 --- Comment #4 from Dlang Bot --- dlang/dmd pull request #11829 "Issue 21295: Add test for symbol lookup/resolve in compilation broken" was merged into master: - 0a33e7cb331719919ad49ba6c8c234ffbceef9b5 by Iain Buclaw: Issue 21295: Add test for symbol lookup/resolve in compilation broken https://github.com/dlang/dmd/pull/11829 -- From d-bugmail at puremagic.com Wed Oct 7 12:33:50 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 07 Oct 2020 12:33:50 +0000 Subject: [Issue 21295] [REG] Symbol lookup/resolve in compilation broken in D In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21295 --- Comment #5 from Dlang Bot --- @ibuclaw created dlang/dmd pull request #11831 "[dmd-cxx] fix Issue 21295: Add test for symbol lookup/resolve in compilation broken" mentioning this issue: - [dmd-cxx] fix Issue 21295: Add test for symbol lookup/resolve in compilation broken https://github.com/dlang/dmd/pull/11831 -- From d-bugmail at puremagic.com Wed Oct 7 13:08:08 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 07 Oct 2020 13:08:08 +0000 Subject: [Issue 21296] std.variant.Variant cannot be initialized with immutable AA In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21296 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Dlang Bot --- dlang/phobos pull request #7652 "Fix issue 21296 - std.variant.Variant cannot be initialized with immu?" was merged into master: - 772c7fcf833d22ccb89f1e9608ce3ee92dfe2c73 by Tomoya Tanjo: Fix issue 21296 - std.variant.Variant cannot be initialized with immutable AA https://github.com/dlang/phobos/pull/7652 -- From d-bugmail at puremagic.com Thu Oct 8 00:13:58 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 08 Oct 2020 00:13:58 +0000 Subject: [Issue 21297] New: profile builds in own project fail with 'statement is not reachable' in Phobos' std/concurrency.d Message-ID: https://issues.dlang.org/show_bug.cgi?id=21297 Issue ID: 21297 Summary: profile builds in own project fail with 'statement is not reachable' in Phobos' std/concurrency.d Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: phobos Assignee: nobody at puremagic.com Reporter: zorael at gmail.com dmd v2.093.1, Manjaro/Arch x86_64. When trying to build a profile build of my project using dub and `dub -b profile`, it fails with a warning of 'statement not reachable' in `std/concurrency.d`. --- import std; void main() { bool receivedSomething; static immutable instant = 1.seconds; thisTid.send(1); do { receivedSomething = receiveTimeout(instant, (Variant v) {}); } while (receivedSomething); } --- dmd -inline -w -profile theabove.d > /usr/include/dlang/dmd/std/concurrency.d(2087): Warning: statement is not reachable https://run.dlang.io/is/u7se6m Both -profile and -inline need to be present. -- From d-bugmail at puremagic.com Thu Oct 8 04:17:53 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 08 Oct 2020 04:17:53 +0000 Subject: [Issue 13165] Using -profile does extra control flow analysis, leading to spurious statement is not reachable warning In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=13165 Mathias LANG changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |zorael at gmail.com --- Comment #6 from Mathias LANG --- *** Issue 21297 has been marked as a duplicate of this issue. *** -- From d-bugmail at puremagic.com Thu Oct 8 04:17:53 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 08 Oct 2020 04:17:53 +0000 Subject: [Issue 21297] profile builds in own project fail with 'statement is not reachable' in Phobos' std/concurrency.d In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21297 Mathias LANG changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |pro.mathias.lang at gmail.com Resolution|--- |DUPLICATE --- Comment #1 from Mathias LANG --- *** This issue has been marked as a duplicate of issue 13165 *** -- From d-bugmail at puremagic.com Thu Oct 8 10:52:06 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 08 Oct 2020 10:52:06 +0000 Subject: [Issue 21298] New: Missing error when overriding interface method without in contract with class method with contract Message-ID: https://issues.dlang.org/show_bug.cgi?id=21298 Issue ID: 21298 Summary: Missing error when overriding interface method without in contract with class method with contract Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: minor Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: default_357-line at yahoo.de Consider the following code: ``` interface I { void foo(int i); } class C : I { override void foo(int i) in (i > 0) { } } ``` If `I` was a class, the compiler would rightly inform us that "function C.foo cannot have an in contract when overridden function I.foo does not have an in contract". However, since I is an interface, this error doesn't trigger. But it should, of course, for the same reason. -- From d-bugmail at puremagic.com Thu Oct 8 10:53:48 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 08 Oct 2020 10:53:48 +0000 Subject: [Issue 12321] Contracts of implemented interface method aren't called In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=12321 FeepingCreature changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |default_357-line at yahoo.de --- Comment #5 from FeepingCreature --- Not a bug - or rather, the issue is a different bug. As per Liskov, a class may only widen, not narrow, its in-contracts. As such, there is no point to calling foo's in-condition, since the interface method already promised that no in-contract would be necessary for the function call. The actual bug is that this specific combination of in-contracts is never valid, and as such the compiler should inform us that if we want to have an incondition on the class, we need to at least define one on the interface as well. (Otherwise the class method contract is provably pointless, as per above.) Such a warning already appears for class inheritance, but is not yet implemented for class-interface inheritance. I've filed that as https://issues.dlang.org/show_bug.cgi?id=21298 . Note that if you put an `in(true);` on foo(), the child foo() will still be ignored, because D interprets incontracts as "if any hierarchy contract passes, the child contract is assumed to pass." You can change this behavior with my flag `-preview=inclusiveincontracts`, whereupon you will get a "Logic error" exception indicating that A's foo() contract was tighter than IA's contract. -- From d-bugmail at puremagic.com Thu Oct 8 13:35:24 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 08 Oct 2020 13:35:24 +0000 Subject: [Issue 21294] [REG 2.095]: DMD fails to link since PR11743 In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21294 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #12 from Dlang Bot --- dlang/dmd pull request #11827 "[REG 2.095] Fix build regression when compiling dmd using separate compilation" was merged into master: - 19959df3dda0d65c0cecb5a191de7733b7a66f9b by Iain Buclaw: Fix Issue 21294: Workaround missing references to template StringValue!(Type) https://github.com/dlang/dmd/pull/11827 -- From d-bugmail at puremagic.com Thu Oct 8 15:15:35 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 08 Oct 2020 15:15:35 +0000 Subject: [Issue 13930] std.concurrency can't send immutable AA to another thread In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=13930 Tomoya Tanjo changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ttanjo at gmail.com --- Comment #3 from Tomoya Tanjo --- I guess this issue contains two distinct problems. The example in the first comment is about the problem of the `send` function. I guess it was already solved by issue 21296 because the following test works without errors (I used phobos commit:f85ca8db in which issue 21296 was fixed): ``` @system unittest { immutable aa = ["0":0]; thisTid.send(aa); } ``` The example in the second comment is about the problem of the `receiveOnly` function (same as issue 19345). This problem only happens with `receiveOnly` but does not happen with other `receive` family such as `receive` and `receiveTimeout`. I confirmed the following tests work without errors (I used phobos commit:f85ca8db): ``` @system unittest { immutable aa = ["0":0]; thisTid.send(aa); receive((immutable int[string] val) {}); } @system unittest { immutable aa = ["0":0]; thisTid.send(aa); receiveTimeout(10.seconds, (immutable int[string] val) {}); } ``` Note: I did not test the case of shared. -- From d-bugmail at puremagic.com Thu Oct 8 17:10:08 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 08 Oct 2020 17:10:08 +0000 Subject: [Issue 21299] New: [LINK] undefined reference to dmd.root.stringtable.StringValue!(Type).StringValue.lstring() Message-ID: https://issues.dlang.org/show_bug.cgi?id=21299 Issue ID: 21299 Summary: [LINK] undefined reference to dmd.root.stringtable.StringValue!(Type).StringValue.ls tring() Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: blocker Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: ibuclaw at gdcproject.org Reduced from link error found in regression from Issue 21294 (which caused a refactoring change in dmd to be reverted). It may not be *the* cause of the Issue 21294, but it's certainly a major issue that needs to be addressed, as this is preventing code in the dmd front-end from being moved around. Test script: ``` dmd -c dmd/mtype.d dmd -c dmd/func.d dmd -c dmd/root/stringtable.d dmd -main mtype.o func.o stringtable.o ``` Test sources ``` // dmd/func.d module dmd.func; import dmd.mtype; import dmd.root.stringtable; class FuncDeclaration { StringTable!Type stringtable; } // dmd/mtype.d module dmd.mtype; import dmd.func; import dmd.root.stringtable; class Type { StringTable!Type stringtable; } // dmd/root/stringtable.d module dmd.root.stringtable; struct StringValue(T) { char* lstring() { return cast(char*)&this; } } struct StringTable(T) { StringValue!T* insert() { allocValue; return getValue; } uint allocValue() { StringValue!(T) sv; sv.lstring[0] = 0; return 0; } StringValue!T* getValue() { return cast(StringValue!T*)&this; } } ``` Results in the link error: ``` /usr/bin/ld: mtype.o: in function `_D3dmd4root11stringtable__T11StringTableTCQBo5mtype4TypeZQBe10allocValueMFNaNbNiNfZk': dmd/mtype.d:(.text._D3dmd4root11stringtable__T11StringTableTCQBo5mtype4TypeZQBe10allocValueMFNaNbNiNfZk[_D3dmd4root11stringtable__T11StringTableTCQBo5mtype4TypeZQBe10allocValueMFNaNbNiNfZk]+0x13): undefined reference to `_D3dmd4root11stringtable__T11StringValueTCQBo5mtype4TypeZQBe7lstringMFNaNbNiNfZPa' collect2: error: ld returned 1 exit status Error: linker exited with status 1 ``` -- From d-bugmail at puremagic.com Thu Oct 8 17:16:05 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 08 Oct 2020 17:16:05 +0000 Subject: [Issue 21299] [LINK] undefined reference to dmd.root.stringtable.StringValue!(Type).StringValue.lstring() In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21299 Iain Buclaw changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |industry CC| |ibuclaw at gdcproject.org -- From d-bugmail at puremagic.com Thu Oct 8 20:25:15 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 08 Oct 2020 20:25:15 +0000 Subject: [Issue 21289] [The D Bug Tracker] "File does not exist" FileException on c:\hiberfil.sys In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21289 Vital changed: What |Removed |Added ---------------------------------------------------------------------------- Component|dlang.org |phobos -- From d-bugmail at puremagic.com Thu Oct 8 22:39:08 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 08 Oct 2020 22:39:08 +0000 Subject: [Issue 19443] core.simd generates incorrect code In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=19443 Nathan S. changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |n8sh.secondary at hotmail.com Component|phobos |dmd Severity|minor |normal --- Comment #1 from Nathan S. --- I ran into MOVHLPS not working today. I spent some time looking through DMD but couldn't find anything different between the way it treats MOVHLPS and MOVLHPS (the latter of which as j.kulaviir said works fine) aside from them having different opcodes. -- From d-bugmail at puremagic.com Thu Oct 8 23:20:40 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 08 Oct 2020 23:20:40 +0000 Subject: [Issue 21299] [LINK] undefined reference to dmd.root.stringtable.StringValue!(Type).StringValue.lstring() In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21299 --- Comment #1 from Iain Buclaw --- What looks to be the reason for the issue: struct StringTable(T) { StringValue!T* insert() fwdrefs -> allocValue; getValue; uint allocValue() instantiates -> StringValue!(T) StringValue!T* getValue() } 1. StringTable!(Type) is having semantic ran from 'dmd.mtype' scope. 2. All members have semantic ran in order of declaration using mtype scope. 3. allocValue is a forward reference inside insert(), so functionSemantic3() is called, which switches to using _scope member, which is the scope of the first instantiation context (not the current) 'dmd.func'. 4. allocValue instantiates StringValue!(Type) using func scope. 5. StringValue!(Type) is appended to the non-root module 'dmd.func', and so not emitted. ------------- Swap the insert() and allocValue() members around though, and the execution path becomes: 1. StringTable!(Type) is having semantic ran from 'dmd.mtype' scope. 2. All members have semantic ran in order of declaration using mtype scope. 3. allocValue instantiates StringValue!(Type) using mtype scope. 4. StringValue!(Type) is appended to the root module 'dmd.mtype', so is emitted. ------------- Immediately then, the problem may be one of: - functionSemantic()/functionSemantic3() doesn't accept a Scope parameter, so the context that they are being evaluated in is lost. They should be fixed to accept a Scope parameter. - The _scope of a function is not updated if a second instantiation occurs in a root module. -- From d-bugmail at puremagic.com Fri Oct 9 12:05:23 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 12:05:23 +0000 Subject: [Issue 21299] [LINK] undefined reference to dmd.root.stringtable.StringValue!(Type).StringValue.lstring() In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21299 --- Comment #2 from Iain Buclaw --- In `templateInstanceSemantic`, there is a shortcut for merging multiple template instantiations originating from the same template decl. It fixes up the `minst` Module of the first instantiation to point at the root module instead of a non-root module. However, the first instantiation ran `tryExpandMembers`, which had set the `_scope.minst` of all Dsymbol members to the non-root module. This is left intact despite their parent instance being updated. Why is it important to note this? In the event of handling forward references, all further template instantiations from are pushed into that non-root module that came from `_scope.minst`. It is this that leads to undefined references in both the mtype and func modules, they should have been pushed to the root module, but `_scope.minst` is now incorrectly set. A patch I am preparing for this adds a new Visitor to walk over all members and update their `_scope.minst` to be the root module. -- From d-bugmail at puremagic.com Fri Oct 9 12:05:30 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 12:05:30 +0000 Subject: [Issue 21299] [LINK] undefined reference to dmd.root.stringtable.StringValue!(Type).StringValue.lstring() In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21299 Iain Buclaw changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- From d-bugmail at puremagic.com Fri Oct 9 13:08:58 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 13:08:58 +0000 Subject: [Issue 20235] C++ ABI doesn't destruct struct arguments in the callee In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20235 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code CC| |bugzilla at digitalmars.com -- From d-bugmail at puremagic.com Fri Oct 9 13:10:45 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 13:10:45 +0000 Subject: [Issue 20235] C++ ABI doesn't destruct struct arguments in the callee In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20235 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |industry -- From d-bugmail at puremagic.com Fri Oct 9 13:18:32 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 13:18:32 +0000 Subject: [Issue 20008] __traits(allMembers) of packages is complete nonsense In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20008 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla at digitalmars.com See Also| |https://issues.dlang.org/sh | |ow_bug.cgi?id=19590 -- From d-bugmail at puremagic.com Fri Oct 9 13:18:32 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 13:18:32 +0000 Subject: [Issue 19590] __traits allMembers should put fully qualified names for imports In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=19590 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://issues.dlang.org/sh | |ow_bug.cgi?id=20008 -- From d-bugmail at puremagic.com Fri Oct 9 13:20:02 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 13:20:02 +0000 Subject: [Issue 19590] __traits allMembers should put fully qualified names for imports In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=19590 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |industry CC| |bugzilla at digitalmars.com -- From d-bugmail at puremagic.com Fri Oct 9 13:21:07 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 13:21:07 +0000 Subject: [Issue 19590] __traits allMembers should put fully qualified names for imports In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=19590 --- Comment #6 from Adam D. Ruppe --- I'm of the opinion that modules are not members of anything and should thus NEVER appear in __traits(allMembers). A new trait should be added for imports. A module name should also ALWAYS be given as its proper, full name, NEVER truncated. -- From d-bugmail at puremagic.com Fri Oct 9 13:23:56 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 13:23:56 +0000 Subject: [Issue 19590] __traits allMembers should put fully qualified names for imports In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=19590 --- Comment #7 from Walter Bright --- This was reverted because it broke existing code. The solution can be leaving allMembers alone and come up with a new name, allMembers2 for the new behavior. -- From d-bugmail at puremagic.com Fri Oct 9 13:28:29 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 13:28:29 +0000 Subject: [Issue 20552] Deprecated Nullable.get warning with Appenders In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20552 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |industry CC| |bugzilla at digitalmars.com -- From d-bugmail at puremagic.com Fri Oct 9 13:37:02 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 13:37:02 +0000 Subject: [Issue 20023] Separate compilation breaks dip1000 / dip1008 @safety In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20023 --- Comment #5 from Walter Bright --- Probably the way to fix this is to add a switch which says make these checks transitive. -- From d-bugmail at puremagic.com Fri Oct 9 14:12:14 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 14:12:14 +0000 Subject: [Issue 19545] __traits(compiles, X) false positive, further uses of X succeed but don't link In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=19545 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |industry, wrong-code CC| |bugzilla at digitalmars.com -- From d-bugmail at puremagic.com Fri Oct 9 14:18:31 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 14:18:31 +0000 Subject: [Issue 21298] Missing error when overriding interface method without in contract with class method with contract In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21298 John Colvin changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |industry CC| |john.loughran.colvin at gmail. | |com -- From d-bugmail at puremagic.com Fri Oct 9 14:19:00 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 14:19:00 +0000 Subject: [Issue 21298] Missing error when overriding interface method without in contract with class method with contract In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21298 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla at digitalmars.com -- From d-bugmail at puremagic.com Fri Oct 9 14:22:48 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 14:22:48 +0000 Subject: [Issue 20916] hard to find where a deprecation comes from In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20916 Mathias LANG changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pro.mathias.lang at gmail.com --- Comment #2 from Mathias LANG --- Example code: ``` import std.stdio; struct Foo { pure nothrow @nogc @safe: deprecated string toString() const { return "Hello"; } int value; } void main () { Foo f; writeln(f); } ``` Currently this prints: ``` std/format.d(3921): Deprecation: function foo.Foo.toString is deprecated std/format.d(4053): Deprecation: function foo.Foo.toString is deprecated ``` We would like it to print something similar to how template instantiation failures are printed, that is: ``` std/format.d(4053): Deprecation: function foo.Foo.toString is deprecated std/format.d(4430): instantiated from here: formatObject!(LockingTextWriter, Foo, char) std/format.d(1875): instantiated from here: formatValueImpl!(LockingTextWriter, Foo, char) std/format.d(576): instantiated from here: formatValue!(LockingTextWriter, Foo, char) std/stdio.d(1565): instantiated from here: formattedWrite!(LockingTextWriter, char, Foo) std/stdio.d(3927): instantiated from here: write!(Foo, char) foo.d(15): instantiated from here: writeln!(Foo) ``` -- From d-bugmail at puremagic.com Fri Oct 9 14:27:57 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 14:27:57 +0000 Subject: [Issue 21298] Missing error when overriding interface method without in contract with class method with contract In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21298 --- Comment #1 from Mario Kroeplin --- Worse: no semantic analysis is done for the in condition of the override: class C : I { override void foo(int i) in (something, stupid) { } } -- From d-bugmail at puremagic.com Fri Oct 9 14:29:03 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 14:29:03 +0000 Subject: [Issue 19545] __traits(compiles, X) false positive, further uses of X succeed but don't link In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=19545 FeepingCreature changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |default_357-line at yahoo.de --- Comment #4 from FeepingCreature --- Probably same bug as https://issues.dlang.org/show_bug.cgi?id=19091 ? -- From d-bugmail at puremagic.com Fri Oct 9 15:15:04 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 15:15:04 +0000 Subject: [Issue 13930] std.concurrency can't send immutable AA to another thread In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=13930 --- Comment #4 from Dlang Bot --- @tom-tan created dlang/phobos pull request #7655 "Fix `receiveOnly` for non-assignable types (issue 13930, issue 19345)" mentioning this issue: - Fix receiveOnly for non-assignable types - Fix issue 13930 - std.concurrency can't send immutable AA to another thread - Fix issue 19345 - std.concurrency does not work with structs of const value type https://github.com/dlang/phobos/pull/7655 -- From d-bugmail at puremagic.com Fri Oct 9 15:27:07 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 15:27:07 +0000 Subject: [Issue 20552] Deprecated Nullable.get warning with Appenders In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20552 Mario Kroeplin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kroeplin.d at googlemail.com --- Comment #1 from Mario Kroeplin --- If you use the "-de" switch, however, the code compiles and no deprecation warnings are shown. -- From d-bugmail at puremagic.com Fri Oct 9 15:45:49 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 15:45:49 +0000 Subject: [Issue 21299] [LINK] undefined reference to dmd.root.stringtable.StringValue!(Type).StringValue.lstring() In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21299 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #3 from Dlang Bot --- @ibuclaw updated dlang/dmd pull request #11837 "Fix Issue 21299: Undefined reference to dmd.root.stringtable.StringValue!(Type).lstring()" fixing this issue: - Fix Issue 21299: Undefined reference to dmd.root.stringtable.StringValue!(Type).lstring() In `templateInstanceSemantic`, there exists special handling of matching template instances for the same template declaration to ensure that only at most one instance gets codegen'd. If the primary instance `inst` originated from a non-root module, the `minst` field will be updated so it is now coming from a root module, however all Dsymbol `inst.members` of the instance still have their `_scope.minst` pointing at the original non-root module. We must now propagate `minst` to all members so that forward referenced dependencies that get instantiated will also be appended to the root module, otherwise there will be undefined references at link-time. This doesn't affect compilations where all modules are compiled together, as every module is a root module in that situation. What this primarily affects are cases where there is a mix of root and non-root modules, and a template was first instantiated in a non-root context, then later instantiated again in a root context. https://github.com/dlang/dmd/pull/11837 -- From d-bugmail at puremagic.com Fri Oct 9 16:43:11 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 16:43:11 +0000 Subject: [Issue 21234] Import expression can read files outside of -J path in case of symlink/hardlink In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21234 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Dlang Bot --- @andrey-zherikov updated dlang/dmd pull request #11836 "Fix issue 21234: Import expression can read files outside of -J path in case of symlink/hardlink" fixing this issue: - Fix issue 21234: Import expression can read files outside of -J path in case of symlink/hardlink https://github.com/dlang/dmd/pull/11836 -- From d-bugmail at puremagic.com Fri Oct 9 17:33:29 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 17:33:29 +0000 Subject: [Issue 21299] [LINK] undefined reference to dmd.root.stringtable.StringValue!(Type).StringValue.lstring() In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21299 --- Comment #4 from Dlang Bot --- @ibuclaw created dlang/dmd pull request #11838 "[stable] Fix Issue 21299: Undefined reference to dmd.root.stringtable.StringValue!(Type).lstring()" fixing this issue: - Fix Issue 21299: Undefined reference to dmd.root.stringtable.StringValue!(Type).lstring() In `templateInstanceSemantic`, there exists special handling of matching template instances for the same template declaration to ensure that only at most one instance gets codegen'd. If the primary instance `inst` originated from a non-root module, the `minst` field will be updated so it is now coming from a root module, however all Dsymbol `inst.members` of the instance still have their `_scope.minst` pointing at the original non-root module. We must now propagate `minst` to all members so that forward referenced dependencies that get instantiated will also be appended to the root module, otherwise there will be undefined references at link-time. This doesn't affect compilations where all modules are compiled together, as every module is a root module in that situation. What this primarily affects are cases where there is a mix of root and non-root modules, and a template was first instantiated in a non-root context, then later instantiated again in a root context. https://github.com/dlang/dmd/pull/11838 -- From d-bugmail at puremagic.com Fri Oct 9 17:40:01 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 17:40:01 +0000 Subject: [Issue 20916] hard to find where a deprecation comes from In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20916 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #3 from Dlang Bot --- @Geod24 created dlang/dmd pull request #11839 "Fix 20916 - Print trace for deprecations triggered inside templates" fixing this issue: - Fix 20916 - Print trace for deprecations triggered inside templates https://github.com/dlang/dmd/pull/11839 -- From d-bugmail at puremagic.com Fri Oct 9 19:26:29 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 19:26:29 +0000 Subject: [Issue 21300] New: C++ header generation produce nonsense code on enum with enum as parent Message-ID: https://issues.dlang.org/show_bug.cgi?id=21300 Issue ID: 21300 Summary: C++ header generation produce nonsense code on enum with enum as parent Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: C++ Severity: blocker Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: pro.mathias.lang at gmail.com Code, extracted from DMD: ``` extern(C++): enum Color : int { Blue, Red, Green, } enum Classification { Deprecation = Color.Blue, Error = Color.Red, Tip = Color.Green, } ``` Using master: * de9057ea6 - (upstream/master, origin/master, origin/HEAD, master) Merge pull request #11805 from MoonlightSentinel/build-from-run (14 hours ago) ``` // Automatically generated by Digital Mars D Compiler #pragma once #include #include enum class Color { Blue = 0, Red = 1, Green = 2, }; namespace Classification { static Color const Deprecation = (Classification)(Color)0; static Color const Error = (Classification)(Color)1; static Color const Tip = (Classification)(Color)2; }; ``` Compiling this code: ``` In file included from foo.cpp:1: ./foobar.h:18:39: error: unexpected namespace name 'Classification': expected expression static Color const Deprecation = (Classification)(Color)0; ^ ./foobar.h:18:55: error: 'Color' does not refer to a value static Color const Deprecation = (Classification)(Color)0; ^ ./foobar.h:9:12: note: declared here enum class Color ^ ./foobar.h:19:33: error: unexpected namespace name 'Classification': expected expression static Color const Error = (Classification)(Color)1; ^ ./foobar.h:19:49: error: 'Color' does not refer to a value static Color const Error = (Classification)(Color)1; ^ ./foobar.h:9:12: note: declared here enum class Color ^ ./foobar.h:20:31: error: unexpected namespace name 'Classification': expected expression static Color const Tip = (Classification)(Color)2; ^ ./foobar.h:20:47: error: 'Color' does not refer to a value static Color const Tip = (Classification)(Color)2; ^ ./foobar.h:9:12: note: declared here enum class Color ^ 6 errors generated. ``` Marking as blocker since this is a pattern used in DMD, and dtoh is now required by the CI. -- From d-bugmail at puremagic.com Fri Oct 9 23:18:25 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 09 Oct 2020 23:18:25 +0000 Subject: [Issue 8044] Print names, not casted values when using enum template parameter In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=8044 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #3 from Dlang Bot --- @Geod24 created dlang/dmd pull request #11841 "Fix 8044 - Print name of enum passed a tmpl param" fixing this issue: - Fix 8044 - Print name of enum passed a tmpl param https://github.com/dlang/dmd/pull/11841 -- From d-bugmail at puremagic.com Sat Oct 10 00:11:11 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 10 Oct 2020 00:11:11 +0000 Subject: [Issue 14067] template parameters of enum type in DDoc are broken In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=14067 Mathias LANG changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |pro.mathias.lang at gmail.com Resolution|--- |DUPLICATE --- Comment #1 from Mathias LANG --- Nice find. Yes the formatting is utterly broken. Technically, this is a duplicate of 8044, for which I just opened a PR for. *** This issue has been marked as a duplicate of issue 8044 *** -- From d-bugmail at puremagic.com Sat Oct 10 00:11:11 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 10 Oct 2020 00:11:11 +0000 Subject: [Issue 8044] Print names, not casted values when using enum template parameter In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=8044 Mathias LANG changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sinkuupump at gmail.com --- Comment #4 from Mathias LANG --- *** Issue 14067 has been marked as a duplicate of this issue. *** -- From d-bugmail at puremagic.com Sat Oct 10 00:12:16 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 10 Oct 2020 00:12:16 +0000 Subject: [Issue 8044] Print names, not casted values when using enum template parameter In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=8044 Mathias LANG changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |timothee.cour2 at gmail.com --- Comment #5 from Mathias LANG --- *** Issue 18479 has been marked as a duplicate of this issue. *** -- From d-bugmail at puremagic.com Sat Oct 10 00:12:16 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 10 Oct 2020 00:12:16 +0000 Subject: [Issue 18479] does not match template declaration: syntax highlight error and enum not symbolized In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=18479 Mathias LANG changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |pro.mathias.lang at gmail.com Resolution|--- |DUPLICATE --- Comment #2 from Mathias LANG --- The syntax highlight thing is fixed, and the enum thing is a duplicate of 8044 for which I just opened a PR. *** This issue has been marked as a duplicate of issue 8044 *** -- From d-bugmail at puremagic.com Sat Oct 10 00:33:46 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 10 Oct 2020 00:33:46 +0000 Subject: [Issue 19345] std.concurrency does not work with structs of const value type In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=19345 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #3 from Dlang Bot --- @tom-tan updated dlang/phobos pull request #7655 "Fix `receiveOnly` for non-assignable types (issue 13930, issue 19345)" fixing this issue: - Fix issue 13930, 19345 - Fix receiveOnly for non-assignable types https://github.com/dlang/phobos/pull/7655 -- From d-bugmail at puremagic.com Sat Oct 10 00:39:59 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 10 Oct 2020 00:39:59 +0000 Subject: [Issue 21293] dtoh: segfault when encountering opaque enum In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21293 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #2 from Dlang Bot --- @MoonlightSentinel created dlang/dmd pull request #11843 "Fix Issue 21293 - dtoh: segfault when encountering opaque enum" fixing this issue: - Fix Issue 21293 - dtoh: segfault when encountering opaque enum Don't access non-existant members and require C++11 https://github.com/dlang/dmd/pull/11843 -- From d-bugmail at puremagic.com Sat Oct 10 02:09:24 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 10 Oct 2020 02:09:24 +0000 Subject: [Issue 13930] std.concurrency can't send immutable AA to another thread In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=13930 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #5 from Dlang Bot --- dlang/phobos pull request #7655 "Fix issue 13930, 19345 - Fix `receiveOnly` for non-assignable types " was merged into master: - d86c1f605995b423dd1a467b2c1c530dc52adb1e by Tomoya Tanjo: Fix issue 13930, 19345 - Fix receiveOnly for non-assignable types https://github.com/dlang/phobos/pull/7655 -- From d-bugmail at puremagic.com Sat Oct 10 02:09:25 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 10 Oct 2020 02:09:25 +0000 Subject: [Issue 19345] std.concurrency does not work with structs of const value type In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=19345 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #4 from Dlang Bot --- dlang/phobos pull request #7655 "Fix issue 13930, 19345 - Fix `receiveOnly` for non-assignable types " was merged into master: - d86c1f605995b423dd1a467b2c1c530dc52adb1e by Tomoya Tanjo: Fix issue 13930, 19345 - Fix receiveOnly for non-assignable types https://github.com/dlang/phobos/pull/7655 -- From d-bugmail at puremagic.com Sat Oct 10 06:37:42 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 10 Oct 2020 06:37:42 +0000 Subject: [Issue 21293] dtoh: segfault when encountering opaque enum In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21293 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Dlang Bot --- dlang/dmd pull request #11843 "Fix Issue 21293 - dtoh: segfault when encountering opaque enum" was merged into master: - 2d392410c08e1817f52207a086ea713902c64998 by MoonlightSentinel: Fix Issue 21293 - dtoh: segfault when encountering opaque enum Don't access non-existant members and require C++11 https://github.com/dlang/dmd/pull/11843 -- From d-bugmail at puremagic.com Sat Oct 10 21:49:59 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 10 Oct 2020 21:49:59 +0000 Subject: [Issue 21301] New: Wrong values being passed as variadic arguments Message-ID: https://issues.dlang.org/show_bug.cgi?id=21301 Issue ID: 21301 Summary: Wrong values being passed as variadic arguments Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: regression Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: cromfr at gmail.com Since DMD 2.084.0, the following code fails: ``` void main() { void func(T...)(T args){ // here args[1] is received as [0, 0, 64, 64, 38, 86, 0, 0, 1, 2, 3, 4] assert(args[1][0 .. 12] == [1,2,3,4,5,6,7,8,9,10,11,12]); } func( ubyte(0), cast(ubyte[12])[1,2,3,4,5,6,7,8,9,10,11,12], cast(float[3])[1f,2f,3f], 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, uint(0), [0,1,2,3,4], uint(0), ); } ``` This code works correctly on DMD 2.083.1, but fails on 2.084.0 and 2.084.1-beta. Adding or removing arguments in the func call (like adding one more 0f value) makes func work correctly and pass its assert. Changing the value of the first ubyte(0) changes the data received as args[1] (but still fails on the assert) args[1] seems to be shifted by 8 bytes -- From d-bugmail at puremagic.com Sat Oct 10 23:23:27 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 10 Oct 2020 23:23:27 +0000 Subject: [Issue 19345] std.concurrency does not work with structs of const value type In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=19345 --- Comment #5 from Dlang Bot --- dlang/phobos pull request #7657 "Revert "Fix issue 13930, 19345 - Fix `receiveOnly` for non-assignable types "" was merged into master: - 756242350896019ffc7a7cbe05e838538a559f5a by Mathias LANG: Revert "Fix issue 13930, 19345 - Fix receiveOnly for non-assignable types" This reverts commit 4f4fef19400ff85eb4699d569b02b21299b254cc. https://github.com/dlang/phobos/pull/7657 -- From d-bugmail at puremagic.com Sat Oct 10 23:23:26 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 10 Oct 2020 23:23:26 +0000 Subject: [Issue 13930] std.concurrency can't send immutable AA to another thread In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=13930 --- Comment #6 from Dlang Bot --- dlang/phobos pull request #7657 "Revert "Fix issue 13930, 19345 - Fix `receiveOnly` for non-assignable types "" was merged into master: - 756242350896019ffc7a7cbe05e838538a559f5a by Mathias LANG: Revert "Fix issue 13930, 19345 - Fix receiveOnly for non-assignable types" This reverts commit 4f4fef19400ff85eb4699d569b02b21299b254cc. https://github.com/dlang/phobos/pull/7657 -- From d-bugmail at puremagic.com Sun Oct 11 03:48:34 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 11 Oct 2020 03:48:34 +0000 Subject: [Issue 21302] New: std.uni's documentation contains a dead link to its source file Message-ID: https://issues.dlang.org/show_bug.cgi?id=21302 Issue ID: 21302 Summary: std.uni's documentation contains a dead link to its source file Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: trivial Priority: P1 Component: phobos Assignee: nobody at puremagic.com Reporter: starcanopy at protonmail.com The dead link is found on line 691 of std/uni/package.d. Current ------- Source: $(PHOBOSSRC std/uni.d) Expected -------- Source: $(PHOBOSSRC std/uni/package.d) -- From d-bugmail at puremagic.com Sun Oct 11 04:02:43 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 11 Oct 2020 04:02:43 +0000 Subject: [Issue 21302] std.uni's documentation contains a dead link to its source file In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21302 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Dlang Bot --- @canopyofstars created dlang/phobos pull request #7658 "Fix issue 21302: std.uni's documentation contains a dead link to its ?" fixing this issue: - Fix issue 21302: std.uni's documentation contains a dead link to its source file https://github.com/dlang/phobos/pull/7658 -- From d-bugmail at puremagic.com Sun Oct 11 04:33:10 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 11 Oct 2020 04:33:10 +0000 Subject: [Issue 21302] std.uni's documentation contains a dead link to its source file In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21302 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Dlang Bot --- dlang/phobos pull request #7658 "Fix issue 21302: std.uni's documentation contains a dead link to its ?" was merged into master: - 9c5a09f10129042fca3238cd39cd1a7b90ab7bf9 by starcanopy: Fix issue 21302: std.uni's documentation contains a dead link to its source file https://github.com/dlang/phobos/pull/7658 -- From d-bugmail at puremagic.com Sun Oct 11 07:33:35 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 11 Oct 2020 07:33:35 +0000 Subject: [Issue 21303] New: Segfault with -preview=dip1021 and -inline on trivial std.socket code Message-ID: https://issues.dlang.org/show_bug.cgi?id=21303 Issue ID: 21303 Summary: Segfault with -preview=dip1021 and -inline on trivial std.socket code Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: mipri at minimaltype.com The following reduced example of a TCP server segfaults with DMD64 D Compiler v2.094.1-beta.1 when compiled with *both* -inline and -preview=dip1021: import std.socket : TcpSocket; import std.stdio : writefln; void main() { auto listener = new TcpSocket; auto client = listener.accept; writefln("Received connection from %s.", client.remoteAddress.toString); } -- From d-bugmail at puremagic.com Sun Oct 11 07:59:08 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 11 Oct 2020 07:59:08 +0000 Subject: [Issue 21194] VisualD cannot build unit-threaded_property.lib: saying corrupt MS Coff object In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21194 Rainer Schuetze changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WORKSFORME --- Comment #3 from Rainer Schuetze --- Cannot reproduce. Please reopen and provide more information if it still happens for you. -- From d-bugmail at puremagic.com Sun Oct 11 08:27:59 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 11 Oct 2020 08:27:59 +0000 Subject: [Issue 21176] deprecation inside template should show the instance loc as errorSupplemental In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21176 Basile-z changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #4 from Basile-z --- *** This issue has been marked as a duplicate of issue 20916 *** -- From d-bugmail at puremagic.com Sun Oct 11 08:27:59 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 11 Oct 2020 08:27:59 +0000 Subject: [Issue 20916] hard to find where a deprecation comes from In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20916 Basile-z changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |b2.temp at gmx.com --- Comment #4 from Basile-z --- *** Issue 21176 has been marked as a duplicate of this issue. *** -- From d-bugmail at puremagic.com Sun Oct 11 10:37:35 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 11 Oct 2020 10:37:35 +0000 Subject: [Issue 21304] New: dtoh silently ignore default parameters, leading to invalid headers Message-ID: https://issues.dlang.org/show_bug.cgi?id=21304 Issue ID: 21304 Summary: dtoh silently ignore default parameters, leading to invalid headers Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: C++ Severity: blocker Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: pro.mathias.lang at gmail.com The following code: ``` extern(C++): struct Bar { int a; } void fooBar (int a = 42, Bar b = Bar.init) {} ``` Will lead to the following header: ``` // Automatically generated by Digital Mars D Compiler v2093 #pragma once #include #include struct Bar; struct Bar { int32_t a; Bar() : a() {} }; extern void fooBar(int32_t a = 42, Bar b); ``` Which won't compile because: ``` ffff.h:17:40: error: missing default argument on parameter 'b' extern void fooBar(int32_t a = 42, Bar b); ^ 1 error generated. ``` Marking as blocker as dtoh is required by the DMD CI. -- From d-bugmail at puremagic.com Sun Oct 11 14:55:26 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 11 Oct 2020 14:55:26 +0000 Subject: [Issue 21305] New: [CI] Cannot re-run Azure tests Message-ID: https://issues.dlang.org/show_bug.cgi?id=21305 Issue ID: 21305 Summary: [CI] Cannot re-run Azure tests Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: TestSuite Severity: normal Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: pro.mathias.lang at gmail.com Due to the fact we are shallow-cloning in Azure, tests cannot be re-run. ``` git checkout --progress --force 013eccaf113e6f23784c615d3ec66434c3629197 fatal: reference is not a tree: 013eccaf113e6f23784c615d3ec66434c3629197 ##[warning]Git checkout failed on shallow repository, this might because of git fetch with depth '1' doesn't include the checkout commit '013eccaf113e6f23784c615d3ec66434c3629197'. Please reference documentation (http://go.microsoft.com/fwlink/?LinkId=829603) ##[error]Git checkout failed with exit code: 128 ``` -- From d-bugmail at puremagic.com Sun Oct 11 14:56:38 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 11 Oct 2020 14:56:38 +0000 Subject: [Issue 21133] What are Azure Pipelines testing? In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21133 Mathias LANG changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |pro.mathias.lang at gmail.com Resolution|--- |INVALID --- Comment #4 from Mathias LANG --- Not a bug, but a question. Closing as it has been answered. -- From d-bugmail at puremagic.com Sun Oct 11 16:53:15 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 11 Oct 2020 16:53:15 +0000 Subject: [Issue 19345] std.concurrency does not work with structs of const value type In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=19345 Mathias LANG changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- -- From d-bugmail at puremagic.com Sun Oct 11 20:29:53 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 11 Oct 2020 20:29:53 +0000 Subject: [Issue 21295] [REG] Symbol lookup/resolve in compilation broken in D In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21295 --- Comment #6 from Dlang Bot --- dlang/dmd pull request #11831 "[dmd-cxx] fix Issue 21295: Add test for symbol lookup/resolve in compilation broken" was merged into dmd-cxx: - fa1aaa4e3aba806cecd68c70f3def12f50f472fb by Iain Buclaw: [dmd-cxx] fix Issue 21295: Add test for symbol lookup/resolve in compilation broken https://github.com/dlang/dmd/pull/11831 -- From d-bugmail at puremagic.com Sun Oct 11 20:29:52 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 11 Oct 2020 20:29:52 +0000 Subject: [Issue 21001] Private alias becomes public if used before declaration In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21001 --- Comment #2 from Dlang Bot --- dlang/dmd pull request #11831 "[dmd-cxx] fix Issue 21295: Add test for symbol lookup/resolve in compilation broken" was merged into dmd-cxx: - 828a643338cf8834608227ea815d94acccdd2b77 by Mathis Beer: [dmd-cxx] Fix issue 21001: alias protection is ignored if used before declaration. https://github.com/dlang/dmd/pull/11831 -- From d-bugmail at puremagic.com Sun Oct 11 20:34:04 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 11 Oct 2020 20:34:04 +0000 Subject: [Issue 21295] [REG] Symbol lookup/resolve in compilation broken in D In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21295 Iain Buclaw changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED -- From d-bugmail at puremagic.com Sun Oct 11 23:58:58 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 11 Oct 2020 23:58:58 +0000 Subject: [Issue 21292] Chrome now blocks downloading .dmg or .exe compiler file by default In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21292 Steven Schveighoffer changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |schveiguy at yahoo.com Hardware|x86 |All Summary|Chrome now blocks |Chrome now blocks |downloading .dmg compiler |downloading .dmg or .exe |file by default |compiler file by default OS|Mac OS X |All --- Comment #3 from Steven Schveighoffer --- I ran into this same problem with Chrome on Windows (and the windows .exe installer). -- From d-bugmail at puremagic.com Mon Oct 12 13:32:23 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 12 Oct 2020 13:32:23 +0000 Subject: [Issue 21010] Windows symlinks In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21010 starcanopy changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |starcanopy at protonmail.com --- Comment #1 from starcanopy --- I'll look into it. -- From d-bugmail at puremagic.com Mon Oct 12 17:15:06 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 12 Oct 2020 17:15:06 +0000 Subject: [Issue 21010] Windows symlinks In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21010 --- Comment #2 from starcanopy --- Adding Windows support to std.file.symlink is mostly done. I just need to get some clarification about some stuff. For std.file.readLink, druntime is missing a conversion of Fileapi.h, and this is the header that declares the function to retrieve the target's path, GetFinalPathNameByHandle[A|W]. For this issue's resolution, I feel that both readLink and symlink need to be simultaneously added. -- From d-bugmail at puremagic.com Mon Oct 12 17:21:47 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 12 Oct 2020 17:21:47 +0000 Subject: [Issue 21306] New: Add D Conversion of Fileapi.h Message-ID: https://issues.dlang.org/show_bug.cgi?id=21306 Issue ID: 21306 Summary: Add D Conversion of Fileapi.h Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: blocker Priority: P1 Component: druntime Assignee: nobody at puremagic.com Reporter: starcanopy at protonmail.com A conversion of Fileapi.h is needed for the following issues' resolutions to: * https://issues.dlang.org/show_bug.cgi?id=19756 * https://issues.dlang.org/show_bug.cgi?id=21010 -- From d-bugmail at puremagic.com Mon Oct 12 17:26:30 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 12 Oct 2020 17:26:30 +0000 Subject: [Issue 21010] Windows symlinks In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21010 starcanopy changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |21306 Referenced Issues: https://issues.dlang.org/show_bug.cgi?id=21306 [Issue 21306] Add D Conversion of Fileapi.h -- From d-bugmail at puremagic.com Mon Oct 12 17:26:30 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 12 Oct 2020 17:26:30 +0000 Subject: [Issue 21306] Add D Conversion of Fileapi.h In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21306 starcanopy changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21010 Referenced Issues: https://issues.dlang.org/show_bug.cgi?id=21010 [Issue 21010] Windows symlinks -- From d-bugmail at puremagic.com Mon Oct 12 17:27:25 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 12 Oct 2020 17:27:25 +0000 Subject: [Issue 21306] Add D Conversion of Fileapi.h In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21306 starcanopy changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |19756 Referenced Issues: https://issues.dlang.org/show_bug.cgi?id=19756 [Issue 19756] Add extended attributes support to std.file -- From d-bugmail at puremagic.com Mon Oct 12 17:27:25 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 12 Oct 2020 17:27:25 +0000 Subject: [Issue 19756] Add extended attributes support to std.file In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=19756 starcanopy changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |starcanopy at protonmail.com Depends on| |21306 Referenced Issues: https://issues.dlang.org/show_bug.cgi?id=21306 [Issue 21306] Add D Conversion of Fileapi.h -- From d-bugmail at puremagic.com Tue Oct 13 02:45:43 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 13 Oct 2020 02:45:43 +0000 Subject: [Issue 21299] [LINK] undefined reference to dmd.root.stringtable.StringValue!(Type).StringValue.lstring() In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21299 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #5 from Dlang Bot --- dlang/dmd pull request #11838 "[stable] Fix Issue 21299: Undefined reference to dmd.root.stringtable.StringValue!(Type).lstring()" was merged into stable: - fb78f0984632f6a9a2cef4dad5f1386115fc978a by Iain Buclaw: Fix Issue 21299: Undefined reference to dmd.root.stringtable.StringValue!(Type).lstring() In `templateInstanceSemantic`, there exists special handling of matching template instances for the same template declaration to ensure that only at most one instance gets codegen'd. If the primary instance `inst` originated from a non-root module, the `minst` field will be updated so it is now coming from a root module, however all Dsymbol `inst.members` of the instance still have their `_scope.minst` pointing at the original non-root module. We must now propagate `minst` to all members so that forward referenced dependencies that get instantiated will also be appended to the root module, otherwise there will be undefined references at link-time. This doesn't affect compilations where all modules are compiled together, as every module is a root module in that situation. What this primarily affects are cases where there is a mix of root and non-root modules, and a template was first instantiated in a non-root context, then later instantiated again in a root context. https://github.com/dlang/dmd/pull/11838 -- From d-bugmail at puremagic.com Tue Oct 13 09:34:25 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 13 Oct 2020 09:34:25 +0000 Subject: [Issue 19345] std.concurrency does not work with structs of const value type In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=19345 --- Comment #6 from Dlang Bot --- @tom-tan created dlang/phobos pull request #7661 "Fix issue 13930, 19345 - Fix `receiveOnly` for non-assignable types" fixing this issue: - Fix issue 13930, 19345 - Fix receiveOnly for non-assignable types https://github.com/dlang/phobos/pull/7661 -- From d-bugmail at puremagic.com Tue Oct 13 15:21:38 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 13 Oct 2020 15:21:38 +0000 Subject: [Issue 21299] [LINK] undefined reference to dmd.root.stringtable.StringValue!(Type).StringValue.lstring() In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21299 --- Comment #6 from Dlang Bot --- dlang/dmd pull request #11867 "[dmd-cxx] Fix Issue 21299: Undefined reference to dmd.root.stringtable.StringValue!(Type).lstring()" was merged into dmd-cxx: - 9ab13379acf226069ced667455d834acf217cc66 by Iain Buclaw: [dmd-cxx] Fix Issue 21299: Undefined reference to dmd.root.stringtable.StringValue!(Type).lstring() In `templateInstanceSemantic`, there exists special handling of matching template instances for the same template declaration to ensure that only at most one instance gets codegen'd. If the primary instance `inst` originated from a non-root module, the `minst` field will be updated so it is now coming from a root module, however all Dsymbol `inst.members` of the instance still have their `_scope.minst` pointing at the original non-root module. We must now propagate `minst` to all members so that forward referenced dependencies that get instantiated will also be appended to the root module, otherwise there will be undefined references at link-time. This doesn't affect compilations where all modules are compiled together, as every module is a root module in that situation. What this primarily affects are cases where there is a mix of root and non-root modules, and a template was first instantiated in a non-root context, then later instantiated again in a root context. https://github.com/dlang/dmd/pull/11867 -- From d-bugmail at puremagic.com Wed Oct 14 08:05:51 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 14 Oct 2020 08:05:51 +0000 Subject: [Issue 21307] New: Testsuite Networking Heisenbug in C++ interop tests / Run (ubuntu-16.04, g++-7) Message-ID: https://issues.dlang.org/show_bug.cgi?id=21307 Issue ID: 21307 Summary: Testsuite Networking Heisenbug in C++ interop tests / Run (ubuntu-16.04, g++-7) Product: D Version: D2 Hardware: All OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: bugzilla at digitalmars.com Log file: ----- Run (ubuntu-16.04, g++-7) failed 2 minutes ago in 12s Search logs 3s 9s Run dlang-community/setup-dlang at v1 Enabling dmd-2.091.0 Downloading http://downloads.dlang.org/releases/2.x/2.091.0/dmd.2.091.0.linux.tar.xz HTTPError: Unexpected HTTP response: 500 at Object. (/home/runner/work/_actions/dlang-community/setup-dlang/v1/node_modules/@actions/tool-cache/lib/tool-cache.js:81:33) at Generator.next () at fulfilled (/home/runner/work/_actions/dlang-community/setup-dlang/v1/node_modules/@actions/tool-cache/lib/tool-cache.js:5:58) at processTicksAndRejections (internal/process/task_queues.js:93:5) { httpStatusCode: 500 } Error: Unexpected HTTP response: 500 -- From d-bugmail at puremagic.com Wed Oct 14 08:05:59 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 14 Oct 2020 08:05:59 +0000 Subject: [Issue 21307] Testsuite Networking Heisenbug in C++ interop tests / Run (ubuntu-16.04, g++-7) In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21307 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |TestSuite -- From d-bugmail at puremagic.com Wed Oct 14 12:04:47 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 14 Oct 2020 12:04:47 +0000 Subject: [Issue 21234] Import expression can read files outside of -J path in case of symlink/hardlink In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21234 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Dlang Bot --- dlang/dmd pull request #11836 "Fix issue 21234: Import expression can read files outside of -J path in case of symlink/hardlink" was merged into master: - ebda81e44fd0ca4b247a1860d9bef411c41c16cb by Andrey Zherikov: Fix issue 21234: Import expression can read files outside of -J path in case of symlink/hardlink https://github.com/dlang/dmd/pull/11836 -- From d-bugmail at puremagic.com Wed Oct 14 15:30:24 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 14 Oct 2020 15:30:24 +0000 Subject: [Issue 21308] New: error message for using to without importing std.conv is missing suggested import Message-ID: https://issues.dlang.org/show_bug.cgi?id=21308 Issue ID: 21308 Summary: error message for using to without importing std.conv is missing suggested import Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: diagnostic Severity: normal Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: schveiguy at yahoo.com The compiler has several symbols that it suggests imports for. std.conv.to is included in the list here: https://github.com/dlang/dmd/blob/aef4ac2a0901e4f2bf6cefe4c69a9c4c22cce76d/src/dmd/imphint.d#L78 However, when calling the function as a function, with an explicit template instantiation, the compiler does not identify the problem of importing std.conv: void main() { auto x = to!string(1); } Error: template instance `to!string` template `to` is not defined However, if I try to use to without an explicit instantiation, or I use UFCS to call it, it does report the error message: void main() { auto x = to(1); } Error: to is not defined, perhaps import std.conv; is needed? or void main() { auto x = 1.to!string; } Error: no property to for type int, perhaps import std.conv; is needed? I would expect the suggestion on the first case as well. Note that this is a problem with all such suggestions for that mechanism, not just to. It's just that to is more often instantiated in this way. The criteria seems to be that it needs to be a template instantiation that is not written as a member. e.g.: void main() { writefln!"hello, %s"("world"); } Error: template instance writefln!"hello, %s" template writefln is not defined All these should suggest the import. -- From d-bugmail at puremagic.com Wed Oct 14 16:51:40 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 14 Oct 2020 16:51:40 +0000 Subject: [Issue 21309] New: Missing core.thread.threadbase documentation Message-ID: https://issues.dlang.org/show_bug.cgi?id=21309 Issue ID: 21309 Summary: Missing core.thread.threadbase documentation Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression Priority: P1 Component: druntime Assignee: nobody at puremagic.com Reporter: alphaglosined at gmail.com 404: https://dlang.org/phobos/core_thread_threadbase.html -- From d-bugmail at puremagic.com Wed Oct 14 18:00:56 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 14 Oct 2020 18:00:56 +0000 Subject: [Issue 21304] dtoh silently ignore default parameters, leading to invalid headers In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21304 Mathias LANG changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Mathias LANG --- Fixed by https://github.com/dlang/dmd/pull/11866 -- From d-bugmail at puremagic.com Wed Oct 14 23:44:00 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 14 Oct 2020 23:44:00 +0000 Subject: [Issue 21310] New: Itanium C++ mangler handling templated multiple pointer arguments with different type qualifiers incorrectly Message-ID: https://issues.dlang.org/show_bug.cgi?id=21310 Issue ID: 21310 Summary: Itanium C++ mangler handling templated multiple pointer arguments with different type qualifiers incorrectly Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: minor Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: jamie.border at uq.net.au Incorrect mangling for templated function with multiple pointer arguments with different type qualifiers. ---- extern(C++) void func(T)(const(T*) a, T* b); void main() { int i = 0; int* pi = &i; func(&i, pi); } ---- This is mangled to _Z4funcIiEvPKT_S1_ with the dmd Itanium C++ mangler implementation, whereas g++ gets _Z4funcIiEvPKT_PS0_ Issue seems to be in checking for substitution of args 2 onwards, where it finds a match between const(T*) and T*. Not an issue for non-templated functions. -- From d-bugmail at puremagic.com Thu Oct 15 00:30:10 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 15 Oct 2020 00:30:10 +0000 Subject: [Issue 8044] Print names, not casted values when using enum template parameter In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=8044 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #6 from Dlang Bot --- dlang/dmd pull request #11841 "Fix 8044 - Print name of enum passed a tmpl param" was merged into master: - 05bf5a11d82676f56751e3e69482df6c22c33a31 by Geod24: Fix 8044 - Print name of enum passed a tmpl param https://github.com/dlang/dmd/pull/11841 -- From d-bugmail at puremagic.com Thu Oct 15 02:18:41 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 15 Oct 2020 02:18:41 +0000 Subject: [Issue 21311] New: Enum super type comparison treated as different types. Message-ID: https://issues.dlang.org/show_bug.cgi?id=21311 Issue ID: 21311 Summary: Enum super type comparison treated as different types. Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: jonathanilevi at gmail.com Pre 2.074.1 this would compile, 2.075.1 it was marked as deprecated: ``` enum E {x} enum A {x} E.x == A.x; ``` This is good, these are not the same types... But this fails?? ``` enum E {x} enum A : E {x} E.x == A.x; ``` This succeeds ```E.x == 0;``` as does this ```(E e){}(A.x);``` as they should. -- From d-bugmail at puremagic.com Thu Oct 15 05:06:35 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 15 Oct 2020 05:06:35 +0000 Subject: [Issue 20916] hard to find where a deprecation comes from In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20916 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #5 from Dlang Bot --- dlang/dmd pull request #11839 "Fix 20916 - Print trace for deprecations triggered inside templates" was merged into master: - 5a86b8dcac2f2e483fbe4ce6264d1238ef6833e6 by Geod24: Fix 20916 - Print trace for deprecations triggered inside templates https://github.com/dlang/dmd/pull/11839 -- From d-bugmail at puremagic.com Thu Oct 15 06:57:59 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 15 Oct 2020 06:57:59 +0000 Subject: [Issue 21312] New: [REG 2.095] Newly triggered is not an lvalue and cannot be modified Message-ID: https://issues.dlang.org/show_bug.cgi?id=21312 Issue ID: 21312 Summary: [REG 2.095] Newly triggered is not an lvalue and cannot be modified Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: industry, rejects-valid Severity: regression Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: pro.mathias.lang at gmail.com Test code: ``` public T deserializeFull (T) () @safe { static if (is(T : E*, E)) { return &[ deserializeFull!(typeof(T.init[0]))() ][0]; } return T.init; } struct Block { string value; } void main () { auto b = deserializeFull!(immutable(Block)*)(); } ``` Works in v2.094.0, but with master, breaks with: ``` foo.d(5): Error: [deserializeFull()][0] is not an lvalue and cannot be modified foo.d(14): Error: template instance foo.deserializeFull!(immutable(Block)*) error instantiating ``` Introduced by https://github.com/dlang/dmd/pull/10124 -- From d-bugmail at puremagic.com Thu Oct 15 07:29:06 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 15 Oct 2020 07:29:06 +0000 Subject: [Issue 21218] dtoh: protection attributes should be emitted to headers In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21218 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Dlang Bot --- dlang/dmd pull request #11804 "Fix 21218 - protection attributes should be emitted to C++ headers" was merged into master: - f0ebacdb3b8e91cbeb42ed86f2123dada7f68658 by MoonlightSentinel: Fix 21218 - protection attributes should be emitted to C++ headers Properly track the current protection while writing struct/class members and add `public:`, `protected:` or `private:` as necessary. `package` and `package(...)` is currently mapped to `protected` as there is no real equivalent in C++. https://github.com/dlang/dmd/pull/11804 -- From d-bugmail at puremagic.com Thu Oct 15 07:32:18 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 15 Oct 2020 07:32:18 +0000 Subject: [Issue 21313] New: TestSuite heisenbug in buildkite/dmd Build Message-ID: https://issues.dlang.org/show_bug.cgi?id=21313 Issue ID: 21313 Summary: TestSuite heisenbug in buildkite/dmd Build Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: bugzilla at digitalmars.com More network heisenbugs. Here's yet another one in buildkite/dmd Build: ``` Preparing working directory | 2s -- | -- ? | Running commands | 0s ? | Print environment | 0s ? | Linux ci-agent-be765bef-9cd1-4979-8732-a90a52bd9c0e 4.4.0-135-generic #161-Ubuntu SMP Mon Aug 27 10:45:01 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux ? | git version 2.7.4 ? | GNU Make 4.1 ? | Built for x86_64-pc-linux-gnu ? | Copyright (C) 1988-2014 Free Software Foundation, Inc. ? | License GPLv3+: GNU GPL version 3 or later ? | This is free software: you are free to change and redistribute it. ? | There is NO WARRANTY, to the extent permitted by law. ? | /bin/bash: line 4: --version: command not found ? | c++ (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609 ? | Copyright (C) 2015 Free Software Foundation, Inc. ? | This is free software; see the source for copying conditions. There is NO ? | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ? | ? ? | GNU gold (GNU Binutils for Ubuntu 2.26.1) 1.11 ? | GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1 ? | Copyright (C) 2016 Free Software Foundation, Inc. ? | License GPLv3+: GNU GPL version 3 or later ? | This is free software: you are free to change and redistribute it. ? | There is NO WARRANTY, to the extent permitted by law. Type "show copying" ? | and "show warranty" for details. ? | This GDB was configured as "x86_64-linux-gnu". ? | Type "show configuration" for configuration details. ? | For bug reporting instructions, please see: ? | . ? | Find the GDB manual and other documentation resources online at: ? | . ? | For help, type "help". ? | Type "apropos word" to search for commands related to "word". ? | /bin/bash: line 8: dmd: command not found ? | warning: failed to remove build/ldc-developers-ldc/bootstrap ? | ? Error: The command exited with status 1 ``` -- From d-bugmail at puremagic.com Thu Oct 15 07:32:30 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 15 Oct 2020 07:32:30 +0000 Subject: [Issue 21313] TestSuite heisenbug in buildkite/dmd Build In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21313 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |TestSuite -- From d-bugmail at puremagic.com Thu Oct 15 13:14:51 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 15 Oct 2020 13:14:51 +0000 Subject: [Issue 21314] New: ICE on extern(c++) static class variables Message-ID: https://issues.dlang.org/show_bug.cgi?id=21314 Issue ID: 21314 Summary: ICE on extern(c++) static class variables Product: D Version: D2 Hardware: All OS: Linux Status: NEW Keywords: ice Severity: critical Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: b2.temp at gmx.com If this is not possible to have TLS static variables in a c++ class then this should be rejected by a standard frontend error. For now it's a (sort of) ICE. test case: --- extern(C++) class C{ static C[] cs; } --- output > /tmp/temp_7FB810174D70.d:1:32: Error: variable `temp_7FB810174D70.C.cs` Internal Compiler Error: C++ static non-`__gshared` non-`extern` variables not supported that should be an error issued during semantic, not as it is now -- From d-bugmail at puremagic.com Thu Oct 15 13:20:23 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 15 Oct 2020 13:20:23 +0000 Subject: [Issue 21314] ICE on extern(c++) static class variables In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21314 Basile-z changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic -- From d-bugmail at puremagic.com Thu Oct 15 13:42:09 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 15 Oct 2020 13:42:09 +0000 Subject: [Issue 21314] ICE on extern(c++) static class variables In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21314 Basile-z changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|critical |normal --- Comment #1 from Basile-z --- lower to normal issue as, as someone pointed me, it's possible to write --- extern(C++) class C{extern(D) static C[] cs; } --- which could be be suggested in the diagnostic maybe. But at least the problem is not a blocker, it's just about an unaesthetic message. -- From d-bugmail at puremagic.com Thu Oct 15 19:29:04 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 15 Oct 2020 19:29:04 +0000 Subject: [Issue 21312] [REG 2.095] Newly triggered is not an lvalue and cannot be modified In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21312 Iain Buclaw changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ibuclaw at gdcproject.org --- Comment #1 from Iain Buclaw --- So if looks like you are using `&[foo()][0]` to get around the fact that call expressions aren't lvalues (e.g: `&foo()`). Two questionable aspects of this come to mind. 1. There's nothing to prevent the optimizer removing the `[ ][0]` as being redundant. 2. There's nothing to prevent the array literal being stack allocated. I'm not entirely sure of the validity of this, but I'll stop short of saying it is invalid. -- From d-bugmail at puremagic.com Thu Oct 15 20:00:55 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 15 Oct 2020 20:00:55 +0000 Subject: [Issue 21315] New: TypeInfo_StaticArray.swap is broken Message-ID: https://issues.dlang.org/show_bug.cgi?id=21315 Issue ID: 21315 Summary: TypeInfo_StaticArray.swap is broken Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: druntime Assignee: nobody at puremagic.com Reporter: n8sh.secondary at hotmail.com Example code: --- void main() { import std.stdio; int[16] a = 1; int[16] b = 2; typeid(int[16]).swap(&a, &b); writeln(a); writeln(b); } --- Expected output: [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2] [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] Actual output: [2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1] [1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2] -- From d-bugmail at puremagic.com Thu Oct 15 20:24:21 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 15 Oct 2020 20:24:21 +0000 Subject: [Issue 21315] TypeInfo_StaticArray.swap is broken In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21315 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Dlang Bot --- @n8sh created dlang/druntime pull request #3237 "Fix Issue 21315 - TypeInfo_StaticArray.swap is broken" fixing this issue: - Fix Issue 21315 - TypeInfo_StaticArray.swap is broken https://github.com/dlang/druntime/pull/3237 -- From d-bugmail at puremagic.com Thu Oct 15 22:52:39 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 15 Oct 2020 22:52:39 +0000 Subject: [Issue 21310] Itanium C++ mangler handling templated multiple pointer arguments with different type qualifiers incorrectly In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21310 jamie changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jamie.border at uq.net.au Severity|minor |normal -- From d-bugmail at puremagic.com Fri Oct 16 01:13:46 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 16 Oct 2020 01:13:46 +0000 Subject: [Issue 21315] TypeInfo_StaticArray.swap is broken In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21315 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Dlang Bot --- dlang/druntime pull request #3237 "Fix Issue 21315 - TypeInfo_StaticArray.swap is broken" was merged into stable: - d7e58c6e3366b137a3fd8f4ad0548214f3acb8fc by Nathan Sashihara: Fix Issue 21315 - TypeInfo_StaticArray.swap is broken https://github.com/dlang/druntime/pull/3237 -- From d-bugmail at puremagic.com Fri Oct 16 06:40:29 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 16 Oct 2020 06:40:29 +0000 Subject: [Issue 21312] [REG 2.095] Newly triggered is not an lvalue and cannot be modified In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21312 --- Comment #2 from Mathias LANG --- > So if looks like you are using `&[foo()][0]` to get around the fact that call expressions aren't lvalues (e.g: `&foo()`). The code is in a deserializer. We handle pointers as single-entry arrays, and the code follow that pattern. It recurses into itself, deserialize a single entry of whatever the element type is, and use this to build an array. It then takes the `.ptr` of this array. It is no different in its intent from: ``` E[] result = [ deserializeFull!(...)(...) ]; return result.ptr; ``` Except that `result.ptr` is not `@safe`, so I'd have to use `return &result[0];`, but was hoping to avoid bounds checking by putting the expression inline. > 1. There's nothing to prevent the optimizer removing the `[ ][0]` as being redundant. `[][0]` might be redundant, but `&[][0]` is not, given `[]` does GC allocation. > 2. There's nothing to prevent the array literal being stack allocated. The compiler shouldn't promote it to the stack if it can't prove the address isn't escaping, which it is here. -- From d-bugmail at puremagic.com Fri Oct 16 07:24:19 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 16 Oct 2020 07:24:19 +0000 Subject: [Issue 21316] New: NRVO not triggered for rvalue/ctor call Message-ID: https://issues.dlang.org/show_bug.cgi?id=21316 Issue ID: 21316 Summary: NRVO not triggered for rvalue/ctor call Product: D Version: D2 Hardware: All URL: http://dlang.org/ OS: All Status: NEW Severity: major Priority: P3 Component: dmd Assignee: nobody at puremagic.com Reporter: eyal at weka.io Example program: import std.stdio; struct S { this(int x) { writefln("%s", &this); } ~this() { writefln("%s", &this); } } unittest { auto f() { return S(1); } auto x = f(); } Running results in 2 different this ptrs, showing a copy had occurred: dmd -unittest -main -run testnrvo 7FFE98EAAD20 7FFE98EAAD48 -- From d-bugmail at puremagic.com Fri Oct 16 07:28:48 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 16 Oct 2020 07:28:48 +0000 Subject: [Issue 21317] New: Copy constructor defined but blitting still occurs Message-ID: https://issues.dlang.org/show_bug.cgi?id=21317 Issue ID: 21317 Summary: Copy constructor defined but blitting still occurs Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: eyal at weka.io When defining a copy constructor, lack of NRVO (#21316) can still cause implicit blitting, despite the DIP[1] claiming: "When a copy constructor is defined for a struct, all implicit blitting is disabled for that struct". For example, this program (same as #21316 but with a copy constructor): import std.stdio; struct S { this(int x) { writefln("%s", &this); } ~this() { writefln("%s", &this); } this(scope ref return S) {} } unittest { auto f() { return S(1); } auto x = f(); } Still does blit/copy, silently. [1] https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1018.md -- From d-bugmail at puremagic.com Fri Oct 16 12:08:04 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 16 Oct 2020 12:08:04 +0000 Subject: [Issue 21316] NRVO not triggered for rvalue/ctor call In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21316 kinke changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kinke at gmx.net --- Comment #1 from kinke --- NRVO only triggers for lvalues (=> *named* return-value optimization); you're asking for RVO here. -- From d-bugmail at puremagic.com Fri Oct 16 18:17:17 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 16 Oct 2020 18:17:17 +0000 Subject: [Issue 21318] New: Add ability to get raw stack trace from TraceInfo Message-ID: https://issues.dlang.org/show_bug.cgi?id=21318 Issue ID: 21318 Summary: Add ability to get raw stack trace from TraceInfo Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: druntime Assignee: nobody at puremagic.com Reporter: kytodragon at e.mail.de It would be nice if it was possible to directly retrieve the stack trace of a TraceInfo instance as either void*[] or size_t[]. TraceInfo currently only exports a "resolved" version of each frame as a string via its opApply, which can be very lacking and is not @nogc. Example stack trace on Ubuntu: Exception: Range violation! ??:? [0x55ed1c6558a5] ??:? [0x55ed1c6611e6] ??:? [0x55ed1c644aed] ??:? [0x55ed1c63d128] ??:? [0x55ed1c63d817] ??:? [0x55ed1c6447bb] ??:? [0x55ed1c6446b2] ??:? [0x55ed1c64450d] Since both core.runtime.DefautTraceInfo and the members of core.sys.windows.stacktrace.StackTrace are private, the only way to get a good stack trace is something like this (for Posix): struct DefaultTraceInfo { void** vfptr; int numframes; void*[128] callstack = void; } DefaultTraceInfo* info = cast(DefaultTraceInfo*)cast(void*)er.info; size_t[] trace = cast(size_t[])info.callstack[0..info.numframes]; A standardized way would be appreciated. -- From d-bugmail at puremagic.com Fri Oct 16 22:06:44 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 16 Oct 2020 22:06:44 +0000 Subject: [Issue 20604] [ICE] dtoh ICE with nested template structs (and probably most templates In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20604 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Dlang Bot --- @MoonlightSentinel created dlang/dmd pull request #11875 "Fix 20604 - [ICE] dtoh ICE with nested template structs" fixing this issue: - Fix 20604 - [ICE] dtoh ICE with nested template structs Define a handler for TypeInstance and handle potentially missing template identifiers https://github.com/dlang/dmd/pull/11875 -- From d-bugmail at puremagic.com Fri Oct 16 23:32:37 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 16 Oct 2020 23:32:37 +0000 Subject: [Issue 20604] [ICE] dtoh ICE with nested template structs (and probably most templates In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20604 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Dlang Bot --- dlang/dmd pull request #11875 "Fix 20604 - [ICE] dtoh ICE with nested template structs" was merged into master: - bf4d9dc5b4c13dfc5e8c98b065af8a12956c2876 by MoonlightSentinel: Fix 20604 - [ICE] dtoh ICE with nested template structs Define a handler for TypeInstance and handle potentially missing template identifiers https://github.com/dlang/dmd/pull/11875 -- From d-bugmail at puremagic.com Sat Oct 17 02:27:26 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 17 Oct 2020 02:27:26 +0000 Subject: [Issue 21319] New: DMD crashes on immutable circular reference Message-ID: https://issues.dlang.org/show_bug.cgi?id=21319 Issue ID: 21319 Summary: DMD crashes on immutable circular reference Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: minor Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: menodinulla at gmail.com Compiling this code causes to crash DMD. class C { immutable C c = new C(); } Tested with v2.094.1-beta.1. -- From d-bugmail at puremagic.com Sat Oct 17 02:41:31 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 17 Oct 2020 02:41:31 +0000 Subject: [Issue 20970] Test Suite Azure Pipelines Windows_LDC_Debug x64-debug-ldc failed due to heisenbug In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20970 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #2 from Dlang Bot --- @Geod24 created dlang/dmd pull request #11878 "Fix 20970 - Use a longer retry for curl on Windows" fixing this issue: - Fix 20970 - Use a longer retry for curl on Windows This uses the backoff strategy built in curl, instead of the short 5 seconds retry. Instead, we set retry-max-time, telling curl to fail after 2 minutes. https://github.com/dlang/dmd/pull/11878 -- From d-bugmail at puremagic.com Sat Oct 17 05:58:18 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 17 Oct 2020 05:58:18 +0000 Subject: [Issue 20970] Test Suite Azure Pipelines Windows_LDC_Debug x64-debug-ldc failed due to heisenbug In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20970 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Dlang Bot --- dlang/dmd pull request #11878 "Fix 20970 - Use a longer retry for curl on Windows" was merged into master: - 0427a8378a545ef677ed826e324cbb86c5c75655 by Geod24: Fix 20970 - Use a longer retry for curl on Windows This uses the backoff strategy built in curl, instead of the short 5 seconds retry. Instead, we set retry-max-time, telling curl to fail after 2 minutes. https://github.com/dlang/dmd/pull/11878 -- From d-bugmail at puremagic.com Sat Oct 17 06:59:14 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 17 Oct 2020 06:59:14 +0000 Subject: [Issue 21320] New: @live mistakes borrowed pointer for owner in parameter Message-ID: https://issues.dlang.org/show_bug.cgi?id=21320 Issue ID: 21320 Summary: @live mistakes borrowed pointer for owner in parameter Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: bugzilla at digitalmars.com The code: void free(int*); @live void test1(scope int* p) { free(p); // should be an error because p is borrowed } -- From d-bugmail at puremagic.com Sat Oct 17 06:59:39 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 17 Oct 2020 06:59:39 +0000 Subject: [Issue 21320] @live mistakes borrowed pointer for owner in parameter In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21320 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |live -- From d-bugmail at puremagic.com Sat Oct 17 07:05:44 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 17 Oct 2020 07:05:44 +0000 Subject: [Issue 21320] @live mistakes borrowed pointer for owner in parameter In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21320 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Dlang Bot --- @WalterBright created dlang/dmd pull request #11879 "fix Issue 21320 - @live mistakes borrowed pointer for owner in parameter" fixing this issue: - fix Issue 21320 - @live mistakes borrowed pointer for owner in parameter https://github.com/dlang/dmd/pull/11879 -- From d-bugmail at puremagic.com Sat Oct 17 08:03:36 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 17 Oct 2020 08:03:36 +0000 Subject: [Issue 21320] @live mistakes borrowed pointer for owner in parameter In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21320 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Dlang Bot --- dlang/dmd pull request #11879 "fix Issue 21320 - @live mistakes borrowed pointer for owner in parameter" was merged into master: - f65085c84448bdff6bd81a51fad47874bc4e187c by Walter Bright: fix Issue 21320 - @live mistakes borrowed pointer for owner in parameter https://github.com/dlang/dmd/pull/11879 -- From d-bugmail at puremagic.com Sat Oct 17 11:25:25 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 17 Oct 2020 11:25:25 +0000 Subject: [Issue 21321] New: Class with unimplemented interface method compiles, links, then segfaults, if inherited through abstract base class Message-ID: https://issues.dlang.org/show_bug.cgi?id=21321 Issue ID: 21321 Summary: Class with unimplemented interface method compiles, links, then segfaults, if inherited through abstract base class Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: major Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: eiderdaus at gmail.com DMD 2.094.0 on 64-bit Linux. interface I { int f(); } abstract class A : I { } class B : A { } void main() { I i = new B(); i.f(); } This program compiles, links, and then segfaults at runtime once i.f() is called. The call to i.f() is necessary to trigger the segfault. Expected instead: This program fails to compile. The compiler should recognize class B as wrongly implemented because B doesn't implement int f(). This definition of class B shouldn't compile. (Or, if you disagree whether the definition of class B should compile, then, at the very least, the compiler should recognize B as abstract and the line "I i = new B();" should error. But I encourage that this empty definition of B itself be an error.) The impact of this bug is that programs will compile even though their types do not satisfy their interfaces. This breaks a basic promise of the type system: We shouldn't have to call all possible methods in all possible derived classes at runtime merely to find what we should implement. Workaround: Write "class B : A, I" instead of "class B : A", then we get the correct compiler error already for the definition of the class, even when we delete all code in main(). Related but different bug: "Unimplemented methods of interface are not reported as errors during compilation." https://issues.dlang.org/show_bug.cgi?id=21184 In that bug, the program compiles, but fails to link. -- From d-bugmail at puremagic.com Sat Oct 17 11:59:34 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 17 Oct 2020 11:59:34 +0000 Subject: [Issue 21322] New: Struct field destructor not called when exception is thrown in the main struct destructor Message-ID: https://issues.dlang.org/show_bug.cgi?id=21322 Issue ID: 21322 Summary: Struct field destructor not called when exception is thrown in the main struct destructor Product: D Version: D2 Hardware: x86_64 OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: chalucha at gmail.com How to reproduce: ```D import std; struct Foo { Bar bar; bool err; ~this() { // scope(failure) destroy(bar); // < this fixes the Bar destructor call enforce(!err, "Test err"); } } struct Bar { static int refs; ~this() { refs--; } } void main() { { Foo f; Bar.refs = 1; } assert(Bar.refs == 0); try () { Foo f; f.err = true; Bar.refs = 1; }(); catch (Exception ex) {} assert(Bar.refs == 0); } ``` So when the exception is thrown within Foo destructor, Bar's destructor isn't called anymore. -- From d-bugmail at puremagic.com Sat Oct 17 12:51:19 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 17 Oct 2020 12:51:19 +0000 Subject: [Issue 21319] DMD crashes on immutable circular reference In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21319 Basile-z changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice CC| |b2.temp at gmx.com Hardware|x86_64 |All OS|Windows |All Severity|minor |regression --- Comment #1 from Basile-z --- regression --- Up to 2.062 : Failure with output: onlineapp.d(5): Error: cannot evaluate new C at compile time 2.063 to 2.064 : Failure with output: onlineapp.d(5): Error: cannot implicitly convert expression (C()) of type onlineapp.C to immutable(C) 2.065.0: Failure with output: ----- onlineapp.d(5): Deprecation: variable onlineapp.C.c immutable field with initializer should be static, __gshared, or an enum onlineapp.d(5): Error: cannot implicitly convert expression (C()) of type onlineapp.C to immutable(C) ----- 2.066.0: Success with output: onlineapp.d(5): Deprecation: variable onlineapp.C.c immutable field with initializer should be static, __gshared, or an enum Since 2.067.1: Segfault and no output --- -- From d-bugmail at puremagic.com Sat Oct 17 13:45:25 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 17 Oct 2020 13:45:25 +0000 Subject: [Issue 21299] [LINK] undefined reference to dmd.root.stringtable.StringValue!(Type).StringValue.lstring() In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21299 --- Comment #7 from Dlang Bot --- dlang/dmd pull request #11874 "Fix Issue 21299: Undefined reference to dmd.root.stringtable.StringValue!(Type).lstring()" was merged into stable: - 01afe9cc8f898eafb0b7bd83080ca302e4fbc74c by Iain Buclaw: Fix Issue 21299: Undefined reference to dmd.root.stringtable.StringValue!(Type).lstring() Alternative patch where instead of proactively fixing up instance members when a template gets changed to a root instance, rather propagate the `minst` as and when we run semantic on the nested templates that still have a non-root `minst` from its scope. https://github.com/dlang/dmd/pull/11874 -- From d-bugmail at puremagic.com Sat Oct 17 16:20:11 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 17 Oct 2020 16:20:11 +0000 Subject: [Issue 8950] postblit not called on const static array initialization In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=8950 kinke changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kinke at gmx.net --- Comment #3 from kinke --- Copy ctors are currently (wrongly) ignored when copying static arrays: https://issues.dlang.org/show_bug.cgi?id=20365 This issue here is pretty bad and inconsistent - the postblit is called correctly for mutable copies and scalar non-mutable copies, only non-mutable static array copies ignore the postblit: void main() { static struct S { int x = 42; this(this) { x += 10; } } { S source; S mutableCopy = source; assert(mutableCopy.x == 52); const S constCopy = source; assert(constCopy.x == 52); } { S[1] source; auto mutableCopy = source; assert(mutableCopy[0].x == 52); const constCopy = source; assert(constCopy[0].x == 52); // fails immutable immutableCopy = source; assert(immutableCopy[0].x == 52); // fails } } -- From d-bugmail at puremagic.com Sat Oct 17 19:00:35 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 17 Oct 2020 19:00:35 +0000 Subject: [Issue 21323] New: (64-bit Windows only) core.stdcpp.vector could not have an element that was also a core.stdcpp.vector Message-ID: https://issues.dlang.org/show_bug.cgi?id=21323 Issue ID: 21323 Summary: (64-bit Windows only) core.stdcpp.vector could not have an element that was also a core.stdcpp.vector Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: normal Priority: P1 Component: druntime Assignee: nobody at puremagic.com Reporter: n8sh.secondary at hotmail.com Example: --- import core.stdcpp.vector: stdcpp_vector = vector; alias VectorVectorInt = stdcpp_vector!(stdcpp_vector!int); ---- Output: ...\import\core\stdcpp\vector.d(590): Error: template core.lifetime.moveEmplace cannot deduce function from argument types !()(stdcpp_vector!(int, allocator!int)), candidates are: ...\import\core\lifetime.d(1787): moveEmplace(T)(ref T source, ref T target) ...\vector_test.d(2): Error: template instance core.stdcpp.vector.stdcpp_vector!(stdcpp_vector!(int, allocator!int), allocator!(stdcpp_vector!(int, allocator!int))) error instantiating -- From d-bugmail at puremagic.com Sat Oct 17 19:03:21 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 17 Oct 2020 19:03:21 +0000 Subject: [Issue 21323] (64-bit Windows only) core.stdcpp.vector could not have core.stdcpp.vector as element In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21323 Nathan S. changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|(64-bit Windows only) |(64-bit Windows only) |core.stdcpp.vector could |core.stdcpp.vector could |not have an element that |not have core.stdcpp.vector |was also a |as element |core.stdcpp.vector | -- From d-bugmail at puremagic.com Sat Oct 17 19:09:56 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 17 Oct 2020 19:09:56 +0000 Subject: [Issue 21323] (64-bit Windows only) core.stdcpp.vector could not have core.stdcpp.vector as element In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21323 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Dlang Bot --- @n8sh created dlang/druntime pull request #3238 "Fix: core.stdcpp.vector cannot have core.stdcpp.vector as element" fixing this issue: - Fix Issue 21323 - (64-bit Windows only) core.stdcpp.vector could not have core.stdcpp.vector as element https://github.com/dlang/druntime/pull/3238 -- From d-bugmail at puremagic.com Sun Oct 18 03:23:22 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 18 Oct 2020 03:23:22 +0000 Subject: [Issue 21283] [C++] Wrong mangling for ref of parameter pack In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21283 --- Comment #3 from Dlang Bot --- dlang/dmd pull request #11845 "merge stable" was merged into master: - b6d97dcfe359956047e6fab59d24403b1589d086 by Boris Carvajal: Fix Issue 21283 - [C++] Wrong mangling for ref of parameter pack https://github.com/dlang/dmd/pull/11845 -- From d-bugmail at puremagic.com Sun Oct 18 03:23:21 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 18 Oct 2020 03:23:21 +0000 Subject: [Issue 21282] mixin of AliasSeq "cannot alias an expression" In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21282 --- Comment #4 from Dlang Bot --- dlang/dmd pull request #11845 "merge stable" was merged into master: - 79cb552da52c71fea2cc4f29969d04ae561af024 by Boris Carvajal: Fix Issue 21282 - mixin of AliasSeq "cannot alias an expression" (#11814) https://github.com/dlang/dmd/pull/11845 -- From d-bugmail at puremagic.com Sun Oct 18 03:23:20 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 18 Oct 2020 03:23:20 +0000 Subject: [Issue 15909] Duplicate case error reports characters as numbers In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=15909 --- Comment #3 from Dlang Bot --- dlang/dmd pull request #11845 "merge stable" was merged into master: - d0a0a7e926498319117a01802bedbd94b90da6b2 by Luhrel: Fix Issue 15909 - Duplicate case error reports characters as numbers https://github.com/dlang/dmd/pull/11845 -- From d-bugmail at puremagic.com Sun Oct 18 07:42:31 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 18 Oct 2020 07:42:31 +0000 Subject: [Issue 21324] New: @live not detecting overwrite of Owner without disposing of previous owned value Message-ID: https://issues.dlang.org/show_bug.cgi?id=21324 Issue ID: 21324 Summary: @live not detecting overwrite of Owner without disposing of previous owned value Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: bugzilla at digitalmars.com int* malloc(); void free(int*); @live void test() { int* p = malloc(); p = malloc(); // does not detect reassignment of owner free(p); } -- From d-bugmail at puremagic.com Sun Oct 18 07:42:57 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 18 Oct 2020 07:42:57 +0000 Subject: [Issue 21324] @live not detecting overwrite of Owner without disposing of previous owned value In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21324 Walter Bright changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |live -- From d-bugmail at puremagic.com Sun Oct 18 07:48:30 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 18 Oct 2020 07:48:30 +0000 Subject: [Issue 21324] @live not detecting overwrite of Owner without disposing of previous owned value In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21324 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Dlang Bot --- @WalterBright created dlang/dmd pull request #11881 "fix Issue 21324 - @live not detecting overwrite of Owner without disp?" fixing this issue: - fix Issue 21324 - @live not detecting overwrite of Owner without disposing of previous owned value https://github.com/dlang/dmd/pull/11881 -- From d-bugmail at puremagic.com Sun Oct 18 08:36:07 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 18 Oct 2020 08:36:07 +0000 Subject: [Issue 21325] New: Wrong code with -release -inline -O Message-ID: https://issues.dlang.org/show_bug.cgi?id=21325 Issue ID: 21325 Summary: Wrong code with -release -inline -O Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: critical Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: thomas.bockman at gmail.com The program below should return 0. On Linux x86_64 it works properly with LDC or GDC, and even with DMD in debug mode. But, it fails and returns 1 with DMD -release -inline -O. (This was reduced from a multi-thousand line program.) //////////////////////////////////////////////// module app; real f(const real x) pure @safe nothrow @nogc { return (x != 0.0L)? x : real.nan; } int main() @safe { ulong x = 0uL; while(true) { const y = f(x); // should set y to real.nan if(y == y) return 1; // bad if(++x) return 0; // good } } //////////////////////////////////////////////// -- From d-bugmail at puremagic.com Sun Oct 18 08:46:29 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 18 Oct 2020 08:46:29 +0000 Subject: [Issue 21325] Wrong code with -release -inline -O In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21325 thomas.bockman at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|critical |regression --- Comment #1 from thomas.bockman at gmail.com --- My example fails on 2.094.1 beta, but works on 2.093 so I am marking this as a regression. -- From d-bugmail at puremagic.com Sun Oct 18 08:50:48 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 18 Oct 2020 08:50:48 +0000 Subject: [Issue 21325] Wrong code with -release -inline -O In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21325 thomas.bockman at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |backend, wrong-code -- From d-bugmail at puremagic.com Sun Oct 18 15:11:12 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 18 Oct 2020 15:11:12 +0000 Subject: [Issue 21271] C++ header generation ignores extern(D) class methods affecting vtable layout In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21271 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Dlang Bot --- @MoonlightSentinel updated dlang/dmd pull request #11872 "dtoh: Emit placeholders for skipped virtual functions" fixing this issue: - Fix 21271: Emit placeholders for skipped virtual functions (dtoh) This ensures proper vtable layout for classes which have extern(D) functions https://github.com/dlang/dmd/pull/11872 -- From d-bugmail at puremagic.com Sun Oct 18 15:29:44 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 18 Oct 2020 15:29:44 +0000 Subject: [Issue 21325] Wrong code with -release -inline -O In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21325 Iain Buclaw changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ibuclaw at gdcproject.org --- Comment #2 from Iain Buclaw --- -release is irrelevant in the issue, replacing `return 1` with `assert(0)` triggers with just -O -inline. Regression was caused by this commit https://github.com/dlang/dmd/pull/11682 -- From d-bugmail at puremagic.com Sun Oct 18 15:46:20 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 18 Oct 2020 15:46:20 +0000 Subject: [Issue 21313] TestSuite heisenbug in buildkite/dmd Build In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21313 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Dlang Bot --- @Geod24 created dlang/dmd pull request #11884 "Fix 21313 - Use curl's retry-all-errors option" fixing this issue: - Fix 21313 - Use curl's retry-all-errors option Curl would only retry 400s, 500s, and timeout, not connection closed by peer or other kind of transition connections. Using '--retry-all-errors' fixes this, however care must be put into avoiding the usage of pipes (see manual). Additionally, the total timeout was increased to 5 minutes as requested by Walter, and the connection timeout was also extended to reflect to be more tolerant. https://github.com/dlang/dmd/pull/11884 -- From d-bugmail at puremagic.com Sun Oct 18 15:47:13 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 18 Oct 2020 15:47:13 +0000 Subject: [Issue 21313] TestSuite heisenbug in buildkite/dmd Build In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21313 --- Comment #2 from Mathias LANG --- *** Issue 21262 has been marked as a duplicate of this issue. *** -- From d-bugmail at puremagic.com Sun Oct 18 15:47:13 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 18 Oct 2020 15:47:13 +0000 Subject: [Issue 21262] Test Suite Heisenbug in Azure Windows x64 In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21262 Mathias LANG changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |pro.mathias.lang at gmail.com Resolution|--- |DUPLICATE --- Comment #1 from Mathias LANG --- This is the same issue as 21313: the lack of `--retry-all-errors` in curl. Since I just raised a PR for 21313, closing this as a duplicated. *** This issue has been marked as a duplicate of issue 21313 *** -- From d-bugmail at puremagic.com Sun Oct 18 15:50:44 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 18 Oct 2020 15:50:44 +0000 Subject: [Issue 21081] Test Suite: Azure pipelines heisenbug timeout In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21081 Mathias LANG changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |pro.mathias.lang at gmail.com Resolution|--- |FIXED --- Comment #1 from Mathias LANG --- The retry strategy already retries for 2 minutes. I have recently made some improvements, and at your request am extending the timeout to 5 minutes. Meanwhile, this specific case was fixed by https://github.com/dlang/dmd/pull/11878 -- From d-bugmail at puremagic.com Sun Oct 18 15:54:43 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 18 Oct 2020 15:54:43 +0000 Subject: [Issue 21271] C++ header generation ignores extern(D) class methods affecting vtable layout In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21271 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Dlang Bot --- dlang/dmd pull request #11872 "dtoh: Emit placeholders for skipped virtual functions" was merged into master: - 2e9015871a058a0b16ace6bc9e285d3de4027b46 by MoonlightSentinel: Fix 21271: Emit placeholders for skipped virtual functions (dtoh) This ensures proper vtable layout for classes which have extern(D) functions https://github.com/dlang/dmd/pull/11872 -- From d-bugmail at puremagic.com Sun Oct 18 20:27:32 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 18 Oct 2020 20:27:32 +0000 Subject: [Issue 21326] New: Every single executable built with dmd crashes with a segfault Message-ID: https://issues.dlang.org/show_bug.cgi?id=21326 Issue ID: 21326 Summary: Every single executable built with dmd crashes with a segfault Product: D Version: D2 Hardware: x86 OS: Linux Status: NEW Severity: major Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: agilbrt at gmail.com Building and executing even the simplest executable with dmd crashes with a segfault. Steps to reproduce sh> echo "void main() {}" > dud.d sh> dmd dud.d sh> ./dud zsh: segmentation fault (core dumped) ./dud (Note: the core file is never actually dumped.) This also happens when building with dub. sh> dub init dud Package recipe format (sdl/json) [json]: sdl Name [dud]: Description [A minimal D application.]: Author name [Ant]: License [proprietary]: Copyright string [Copyright ? 2020, Ant]: Add dependency (leave empty to skip) []: Successfully created an empty project in '/home/ant/dud'. Package successfully created in dud sh> cd dud sh> dub build sh> ./dud zsh: segmentation fault (core dumped) ./dud % dmd --version DMD32 D Compiler v2.094.0 Copyright (C) 1999-2020 by The D Language Foundation, All Rights Reserved written by Walter Bright % dub --version DUB version 1.23.0, built on Sep 22 2020 % uname -a Linux rattle 4.15.0-121-generic #123-Ubuntu SMP Mon Oct 5 16:16:19 UTC 2020 i686 i686 i686 GNU/Linux -- From d-bugmail at puremagic.com Sun Oct 18 21:20:03 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 18 Oct 2020 21:20:03 +0000 Subject: [Issue 21315] TypeInfo_StaticArray.swap is broken In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21315 --- Comment #3 from Dlang Bot --- dlang/druntime pull request #3228 "merge stable" was merged into master: - bf554d252dab605d8da03455955c1687bcb7db9d by Nathan Sashihara: Fix Issue 21315 - TypeInfo_StaticArray.swap is broken https://github.com/dlang/druntime/pull/3228 -- From d-bugmail at puremagic.com Sun Oct 18 22:12:32 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 18 Oct 2020 22:12:32 +0000 Subject: [Issue 21327] New: downloads.dlang.org, enable HTTPS Message-ID: https://issues.dlang.org/show_bug.cgi?id=21327 Issue ID: 21327 Summary: downloads.dlang.org, enable HTTPS Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dlang.org Assignee: nobody at puremagic.com Reporter: issuetracking at mailinator.com -- From d-bugmail at puremagic.com Sun Oct 18 23:50:59 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 18 Oct 2020 23:50:59 +0000 Subject: [Issue 21250] dirEntries on non-existent directory causes assert error In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21250 --- Comment #6 from Dlang Bot --- dlang/phobos pull request #7664 "merge stable" was merged into master: - c5e6213dde8fc0949c39ec2364abfe2070a67b2b by Andrei Alexandrescu: Issue 21250 - dirEntries on non-existent directory causes assert error (#7646) Issue 21250 - dirEntries on non-existent directory causes assert error merged-on-behalf-of: Andrei Alexandrescu https://github.com/dlang/phobos/pull/7664 -- From d-bugmail at puremagic.com Mon Oct 19 04:14:51 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 19 Oct 2020 04:14:51 +0000 Subject: [Issue 21299] [LINK] undefined reference to dmd.root.stringtable.StringValue!(Type).StringValue.lstring() In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21299 --- Comment #8 from Dlang Bot --- dlang/dmd pull request #11886 "merge stable" was merged into master: - 8d6c07f60edfa51e7ad0882def71ef3e6437a465 by Iain Buclaw: Fix Issue 21299: Undefined reference to dmd.root.stringtable.StringValue!(Type).lstring() In `templateInstanceSemantic`, there exists special handling of matching template instances for the same template declaration to ensure that only at most one instance gets codegen'd. If the primary instance `inst` originated from a non-root module, the `minst` field will be updated so it is now coming from a root module, however all Dsymbol `inst.members` of the instance still have their `_scope.minst` pointing at the original non-root module. We must now propagate `minst` to all members so that forward referenced dependencies that get instantiated will also be appended to the root module, otherwise there will be undefined references at link-time. This doesn't affect compilations where all modules are compiled together, as every module is a root module in that situation. What this primarily affects are cases where there is a mix of root and non-root modules, and a template was first instantiated in a non-root context, then later instantiated again in a root context. - cf9113d804ec7a89bb354791d66b9555bc4f3f8d by Iain Buclaw: Fix Issue 21299: Undefined reference to dmd.root.stringtable.StringValue!(Type).lstring() Alternative patch where instead of proactively fixing up instance members when a template gets changed to a root instance, rather propagate the `minst` as and when we run semantic on the nested templates that still have a non-root `minst` from its scope. https://github.com/dlang/dmd/pull/11886 -- From d-bugmail at puremagic.com Mon Oct 19 10:15:45 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 19 Oct 2020 10:15:45 +0000 Subject: [Issue 21326] Every single executable built with dmd crashes with a segfault In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21326 Basile-z changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #1 from Basile-z --- *** This issue has been marked as a duplicate of issue 19116 *** -- From d-bugmail at puremagic.com Mon Oct 19 10:15:45 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 19 Oct 2020 10:15:45 +0000 Subject: [Issue 19116] dmd compiles binary but segfaults immediately when run on Ubuntu / Debian 32Bit architectures In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=19116 Basile-z changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |agilbrt at gmail.com --- Comment #17 from Basile-z --- *** Issue 21326 has been marked as a duplicate of this issue. *** -- From d-bugmail at puremagic.com Mon Oct 19 13:24:13 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 19 Oct 2020 13:24:13 +0000 Subject: [Issue 20324] Calling __traits(getUnitTests) on a template causes compiler segfault In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20324 Adam D. Ruppe changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |destructionator at gmail.com --- Comment #3 from Adam D. Ruppe --- Possible same thing: import std.stdio; mixin template Test() { unittest { writeln("test 1"); } } mixin Test t; unittest { writeln("test 2"); } void main() { pragma(msg, __traits(getUnitTests, Test)); // segfault } -- From d-bugmail at puremagic.com Mon Oct 19 14:00:03 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 19 Oct 2020 14:00:03 +0000 Subject: [Issue 21328] New: Forwarding static float array element inside a lambda crashes dmd backend Message-ID: https://issues.dlang.org/show_bug.cgi?id=21328 Issue ID: 21328 Summary: Forwarding static float array element inside a lambda crashes dmd backend Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Keywords: backend, ice-on-valid-code Severity: regression Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: dkorpel at live.nl When upgrading to dmd 2.094 I found that this (reduced) code crashes dmd: ``` void bar(float x) {} void foo(float[1] arr) { () { bar(arr[0]); } (); } ``` It prints: tym = 0x227 [1] 14828 illegal hardware instruction dmd -c tymbug.d Suggesting a regression in dmd's backend. Possibly caused by: https://github.com/dlang/dmd/pull/11693 I have not verified this yet however. -- From d-bugmail at puremagic.com Mon Oct 19 15:53:41 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 19 Oct 2020 15:53:41 +0000 Subject: [Issue 21329] New: Error message for attribute mismatch points to wrong destructor Message-ID: https://issues.dlang.org/show_bug.cgi?id=21329 Issue ID: 21329 Summary: Error message for attribute mismatch points to wrong destructor Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: snarwin+bugzilla at gmail.com Example program: --- struct Inner { @system ~this() {} } struct Outer { Inner inner; @safe ~this() {} } @safe void main() { Outer outer; } --- Output when compiled with DMD v2.093.1: --- onlineapp.d(14): Error: @safe function D main cannot call @system destructor onlineapp.Outer.~this onlineapp.d(9): onlineapp.Outer.~this is declared here --- The error message incorrectly states that Outer.~this is @system, even though it is @safe. The actual problem is that Inner.~this is @system. -- From d-bugmail at puremagic.com Mon Oct 19 17:00:05 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 19 Oct 2020 17:00:05 +0000 Subject: [Issue 21329] Error message for attribute mismatch points to wrong destructor In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21329 Paul Backus changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Paul Backus --- Turns out this is already fixed in 2.094.0. -- From d-bugmail at puremagic.com Mon Oct 19 17:04:50 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 19 Oct 2020 17:04:50 +0000 Subject: [Issue 20077] Bogus 'need this' for lambda used inside struct In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20077 Lu?s Ferreira changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lsferreira169 at gmail.com --- Comment #1 from Lu?s Ferreira --- This also happens on accessing static fields on a struct. auto foobar(alias func)(string val) { return func(val); } struct S { static immutable foo = "foo"; static immutable bar = foobar!((v) => v[0])(S.foo); } -- From d-bugmail at puremagic.com Mon Oct 19 17:15:44 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 19 Oct 2020 17:15:44 +0000 Subject: [Issue 21330] New: __traits(getUnitTests) on a module should include unittests from anonymous mixins Message-ID: https://issues.dlang.org/show_bug.cgi?id=21330 Issue ID: 21330 Summary: __traits(getUnitTests) on a module should include unittests from anonymous mixins Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: maxsamukha at gmail.com mixin template Test() { unittest { } void foo() { } } mixin Test; pragma(msg, __traits(allMembers, onlineapp)); // tuple("object", "Test", "foo", "main") pragma(msg, __traits(getUnitTests, onlineapp)); // tuple() void main() { } If allMembers returns "foo", then it is reasonable to expect that getUnitTests should return the unittest. Actually, it it impossible to get to the unittest at all because it is impossible to refer to anonymous mixins explicitly. -- From d-bugmail at puremagic.com Mon Oct 19 17:20:31 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 19 Oct 2020 17:20:31 +0000 Subject: [Issue 21331] New: Windows makefiles are outdated Message-ID: https://issues.dlang.org/show_bug.cgi?id=21331 Issue ID: 21331 Summary: Windows makefiles are outdated Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: enhancement Priority: P1 Component: phobos Assignee: nobody at puremagic.com Reporter: grimmaple95 at gmail.com Phobos' makefiles for windows are outdated and make building process significantly harder than it should be. DMD's makefiles contain necessary information to build with Visual Studio 2017 and 2019, and phobos requires VIsual Studio 2015 or below. I managed to get it working in the end, but I think the changes should be done by someone knowledgable in D build environment -- From d-bugmail at puremagic.com Mon Oct 19 17:32:39 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 19 Oct 2020 17:32:39 +0000 Subject: [Issue 21332] New: Circular reference to a static field of a struct for inferred types Message-ID: https://issues.dlang.org/show_bug.cgi?id=21332 Issue ID: 21332 Summary: Circular reference to a static field of a struct for inferred types Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: lsferreira169 at gmail.com On this code: ```d immutable _a = S.c; struct S { immutable a = _a; static immutable c = "bar"; } ``` _a only depends on S.c which is "bar", so this should work, because logically, this is the same as: ```d immutable _a = _c; private immutable _c = "bar"; struct S { immutable a = _a; static immutable c = _c; } ``` The problem here seems to be the type inference on `immutable a`, because this code works fine: ```d immutable _a = S.c; struct S { immutable string a = _a; static immutable c = "bar"; } ``` In the worst case, this should give a more clear message like: "Can't infer type of variable `a`" -- From d-bugmail at puremagic.com Mon Oct 19 17:40:41 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 19 Oct 2020 17:40:41 +0000 Subject: [Issue 20077] Bogus 'need this' for lambda used inside struct In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20077 --- Comment #2 from Lu?s Ferreira --- This seems related to what's happening on #21332. When type is explicitly known on the lambda, this doesn't happen. See this snippet here: ```d auto foobar(alias func)(string val) { return func(val); } struct S { static immutable foo = "foo"; static immutable bar = foobar!((string v) => v[0])(S.foo); } ``` This is the exact same code snippet reported on the latest comment, but the type of `v` is explicitly declared. -- From d-bugmail at puremagic.com Mon Oct 19 17:42:29 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 19 Oct 2020 17:42:29 +0000 Subject: [Issue 21332] Circular reference to a static field of a struct for inferred types In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21332 --- Comment #1 from Lu?s Ferreira --- See also this: https://issues.dlang.org/show_bug.cgi?id=20077 -- From d-bugmail at puremagic.com Mon Oct 19 20:03:00 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 19 Oct 2020 20:03:00 +0000 Subject: [Issue 21330] __traits(getUnitTests) should include unittests from anonymous mixins In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21330 Max Samukha changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|__traits(getUnitTests) on a |__traits(getUnitTests) |module should include |should include unittests |unittests from anonymous |from anonymous mixins |mixins | -- From d-bugmail at puremagic.com Mon Oct 19 22:52:20 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 19 Oct 2020 22:52:20 +0000 Subject: [Issue 21330] __traits(getUnitTests) should include unittests from anonymous mixins In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21330 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Dlang Bot --- @BorisCarvajal created dlang/dmd pull request #11888 "Fix Issue 21330 - __traits(getUnitTests) should include unittests fro?" fixing this issue: - Fix Issue 21330 - __traits(getUnitTests) should include unittests from anonymous mixins https://github.com/dlang/dmd/pull/11888 -- From d-bugmail at puremagic.com Mon Oct 19 23:33:42 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 19 Oct 2020 23:33:42 +0000 Subject: [Issue 21330] __traits(getUnitTests) should include unittests from anonymous mixins In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21330 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Dlang Bot --- dlang/dmd pull request #11888 "Fix Issue 21330 - __traits(getUnitTests) should include unittests fro?" was merged into stable: - 0c7ee93587ad75793c7fa67ac896cb6b9180d6f2 by Boris Carvajal: Fix Issue 21330 - __traits(getUnitTests) should include unittests from anonymous mixins https://github.com/dlang/dmd/pull/11888 -- From d-bugmail at puremagic.com Tue Oct 20 00:15:12 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 20 Oct 2020 00:15:12 +0000 Subject: [Issue 20324] Calling __traits(getUnitTests) on a template causes compiler segfault In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20324 --- Comment #4 from Dlang Bot --- @BorisCarvajal created dlang/dmd pull request #11889 "Fix Issue 20324 - Calling __traits(getUnitTests) on a template causes?" fixing this issue: - Fix Issue 20324 - Calling __traits(getUnitTests) on a template causes compiler segfault https://github.com/dlang/dmd/pull/11889 -- From d-bugmail at puremagic.com Tue Oct 20 01:24:35 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 20 Oct 2020 01:24:35 +0000 Subject: [Issue 20324] Calling __traits(getUnitTests) on a template causes compiler segfault In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=20324 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #5 from Dlang Bot --- dlang/dmd pull request #11889 "Fix Issue 20324 - Calling __traits(getUnitTests) on a template causes?" was merged into stable: - b75a3486f4a4fc953c13972f36923b2eccd0d4e9 by Boris Carvajal: Fix Issue 20324 - Calling __traits(getUnitTests) on a template causes compiler segfault https://github.com/dlang/dmd/pull/11889 -- From d-bugmail at puremagic.com Tue Oct 20 03:13:55 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 20 Oct 2020 03:13:55 +0000 Subject: [Issue 21317] Copy constructor defined but blitting still occurs In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21317 RazvanN changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |razvan.nitu1305 at gmail.com Resolution|--- |INVALID --- Comment #1 from RazvanN --- The copy constructor DIP specifies that the copy constructor may be called only in the case of lvalues; in the case of rvalues a move is performed implicitly. The cited paragraph: "When a copy constructor is defined for a struct, all implicit blitting is disabled for that struct" was referring only to lvalues because that is where you would normally call a copy constructor (although, I agree that the wording should have been better). In this situation the compiler constructs S(1) in the stack of f and then does a move. This is not optimal, but it has nothing to do with copy constructors. Since you already filed an enhancement request for this code, I am going to close this issue as it has nothing to do with copy constructors. -- From d-bugmail at puremagic.com Tue Oct 20 12:24:16 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 20 Oct 2020 12:24:16 +0000 Subject: [Issue 21290] [REG2.073] Incorrect escape deprecation on scope lazy pointer parameter In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21290 --- Comment #2 from johanengelen at weka.io --- Workaround: ``` void foo(scope lazy void* p); struct S { this(int a) { auto b = &this; // temporary variable as workaround. foo(b); } } ``` -- From d-bugmail at puremagic.com Tue Oct 20 13:21:02 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 20 Oct 2020 13:21:02 +0000 Subject: [Issue 21202] [REG2.093] std.algorithm.mutation.moveEmplace cannot deduce purity and errors In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21202 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Dlang Bot --- @JohanEngelen updated dlang/phobos pull request #7670 "Help compiler deduce `pure` for moveEmplaceImpl" fixing this issue: - whitespace fix Fixes issue 21202 https://github.com/dlang/phobos/pull/7670 -- From d-bugmail at puremagic.com Tue Oct 20 14:13:56 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 20 Oct 2020 14:13:56 +0000 Subject: [Issue 14226] invalid Runtime.traceHandler setup In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=14226 johanengelen at weka.io changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |industry CC| |johanengelen at weka.io -- From d-bugmail at puremagic.com Tue Oct 20 14:21:19 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 20 Oct 2020 14:21:19 +0000 Subject: [Issue 21333] New: runModuleUnitTests inner code should be available as a function Message-ID: https://issues.dlang.org/show_bug.cgi?id=21333 Issue ID: 21333 Summary: runModuleUnitTests inner code should be available as a function Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: druntime Assignee: nobody at puremagic.com Reporter: schveiguy at yahoo.com Currently, in order to affect the behavior of the default unit tester, you must reimplement it. In this code: https://github.com/dlang/druntime/blob/86e5cf3fa15afda116994da0c91f40aa7a5e6c6e/src/core/runtime.d#L562 If you define a default unit tester, it skips the normal running of unittests. The meat of actually running the unit tests should be abstracted into a function, such that you can call it but just affect the result (like if you don't want to run main, but you want to suppress a successful output). Simple fix, just abstract the unit test running into its own function. -- From d-bugmail at puremagic.com Wed Oct 21 00:50:46 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 21 Oct 2020 00:50:46 +0000 Subject: [Issue 21285] Delegate covariance broken between 2.092 and 2.094 (git master). In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21285 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Dlang Bot --- dlang/dmd pull request #11819 "Fix Issue 21285 - Delegate covariance broken between 2.092 and 2.094 (git master)." was merged into stable: - 7776770ae204589250a2cb689ea71ae5e0c2dd06 by Simen Kj?r?s: Fix Issue 21285 - Delegate covariance broken between 2.092 and 2.094 (git master) https://github.com/dlang/dmd/pull/11819 -- From d-bugmail at puremagic.com Wed Oct 21 04:52:58 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 21 Oct 2020 04:52:58 +0000 Subject: [Issue 21231] Unreachable warning for empty struct in VariantN with preview=fieldwise In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21231 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Dlang Bot --- dlang/phobos pull request #7624 "Make Phobos compilable with preview=fieldwise" was merged into master: - c7e49f5afd20e874e2e046d6402b40e5698a282e by MoonlightSentinel: Fix 21231 - Unreachable warning for empty struct in VariantN... ... with preview=fieldwise. Equality checks will never fail for instances of empty structs, hence don't generate code checking `<` and `>` for them. This was exposed by `-preview=fieldwise` which (as a side effect) enables dmd to const-fold the aformentioned equality test in the frontend. https://github.com/dlang/phobos/pull/7624 -- From d-bugmail at puremagic.com Wed Oct 21 05:30:25 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 21 Oct 2020 05:30:25 +0000 Subject: [Issue 21334] New: std.conv.to could have an overload taking a default value for conversion errors Message-ID: https://issues.dlang.org/show_bug.cgi?id=21334 Issue ID: 21334 Summary: std.conv.to could have an overload taking a default value for conversion errors Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: phobos Assignee: nobody at puremagic.com Reporter: andrej.mitrovich at gmail.com I would really like this functionality in Phobos: ----- void main() nothrow { enum OP : ubyte { Invalid = 0, OP1 = 1, OP2 = 2 } ubyte bad = 4; OP op = to!(OP, OP.Invalid)(bad); assert(op == OP.Invalid); } ----- In case of conversion errors `to` would return the provided value (and therefore be nothrow). We could alternatively introduce a new function rather than modify `to`. -- From d-bugmail at puremagic.com Wed Oct 21 06:51:35 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 21 Oct 2020 06:51:35 +0000 Subject: [Issue 21335] New: Compiler implicitly converts array to int[] when it doesn't have to Message-ID: https://issues.dlang.org/show_bug.cgi?id=21335 Issue ID: 21335 Summary: Compiler implicitly converts array to int[] when it doesn't have to Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: andrej.mitrovich at gmail.com ----- enum OP : ubyte { PUSH = 2 } void take (ubyte[]) { } void main () { ubyte[2] bytes; take([OP.PUSH, bytes[0]]); // ok take([bytes[0]] ~ bytes); // ok take([OP.PUSH, bytes[0]] ~ bytes); // error. promotion to int[]?! } ----- Why is it promoting `OP.PUSH` into an integer in the last call? It makes absolutely no sense at all. -- From d-bugmail at puremagic.com Thu Oct 22 08:56:58 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 22 Oct 2020 08:56:58 +0000 Subject: [Issue 21336] New: [2.094.1] Memory corruption of TemplateInstance Message-ID: https://issues.dlang.org/show_bug.cgi?id=21336 Issue ID: 21336 Summary: [2.094.1] Memory corruption of TemplateInstance Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: uplink.coder at gmail.com Created attachment 1809 --> https://issues.dlang.org/attachment.cgi?id=1809&action=edit testcase for the issue. Since the new version of dmd the code in the archive attached to this bug report fails. to reproduce untar the archive cd into repro.reduced and run ../bld.sh You will see it segfault with 2.094.1 But succeeded with 2.094.0 The root cause for this, is stale data kept around in a memory pool. Introduced in https://github.com/dlang/dmd/pull/11381 -- From d-bugmail at puremagic.com Thu Oct 22 10:04:06 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 22 Oct 2020 10:04:06 +0000 Subject: [Issue 21328] Forwarding static float array element inside a lambda crashes dmd backend In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21328 --- Comment #1 from Dennis --- Further reduced to: ``` void foo(float[1] arr) { () { float x = arr[0]; } (); } ``` The assert on src/dmd/backend/cgxmm.d:804 fails because `xmmstore` is called with tym_t = TYarray | mTYvolatile, and there is no case for TYarray in the `switch (tybasic(tym))`. I've bisected it with Digger, it's introduced in: https://github.com/dlang/dmd/pull/10200 -- From d-bugmail at puremagic.com Thu Oct 22 12:56:32 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 22 Oct 2020 12:56:32 +0000 Subject: [Issue 21336] [2.094.1] Memory corruption of TemplateInstance In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21336 --- Comment #1 from Stefan Koch --- I will have to amend my testcase as this particular one seems to fail even with the pool reverted. That means the pool is not the only issue, but certainly one of the contributing factors. -- From d-bugmail at puremagic.com Thu Oct 22 13:06:49 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 22 Oct 2020 13:06:49 +0000 Subject: [Issue 21337] New: join can iterates ranges multiple times Message-ID: https://issues.dlang.org/show_bug.cgi?id=21337 Issue ID: 21337 Summary: join can iterates ranges multiple times Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: phobos Assignee: nobody at puremagic.com Reporter: rmanth at gmail.com class Once { bool empty; void popFront() { empty = true; } int front() { return 0; } } void main() { import std.array : join; import std.algorithm.iteration : map; assert([1, 2].map!"[a]".join(new Once) == [1, 0, 2]); // fails } Join iterates `Once` once to make an array and again for each separator, which obviously doesn't work. -- From d-bugmail at puremagic.com Thu Oct 22 13:12:52 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 22 Oct 2020 13:12:52 +0000 Subject: [Issue 21337] join can iterates ranges multiple times In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21337 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Dlang Bot --- @rmanthorpe created dlang/phobos pull request #7674 "Fix Issue 21337: Join can iterate ranges multiple times" fixing this issue: - Fix Issue 21337: Join can iterates ranges multiple times https://github.com/dlang/phobos/pull/7674 -- From d-bugmail at puremagic.com Thu Oct 22 20:15:48 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 22 Oct 2020 20:15:48 +0000 Subject: [Issue 21338] New: Move functional style code's unit tests outside scope, to actually test them. Message-ID: https://issues.dlang.org/show_bug.cgi?id=21338 Issue ID: 21338 Summary: Move functional style code's unit tests outside scope, to actually test them. Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: phobos Assignee: nobody at puremagic.com Reporter: crazymonkyyy at gmail.com https://run.dlang.io/is/UxBhfw import std; void main() { writeln("Learning D is fun".split!isWhite); } This is copy and pasted from the unittests, it behaves different based on scope to the point I'm not sure "auto split(alias isTerminator, Range)(Range range)" can exist outside of std code. -- From d-bugmail at puremagic.com Thu Oct 22 20:56:14 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 22 Oct 2020 20:56:14 +0000 Subject: [Issue 21339] New: --DRT-trapExceptions is not documented Message-ID: https://issues.dlang.org/show_bug.cgi?id=21339 Issue ID: 21339 Summary: --DRT-trapExceptions is not documented Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: dlang.org Assignee: nobody at puremagic.com Reporter: acehreli at yahoo.com --DRT-trapExceptions=0 was introduced in dmd 2.080 but it is nowhere to be found on the dlang site: https://dlang.org/changelog/2.082.0.html#exceptions-opt It would be nice to make sure all runtime switches are documented. -- From d-bugmail at puremagic.com Thu Oct 22 20:57:04 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 22 Oct 2020 20:57:04 +0000 Subject: [Issue 21339] --DRT-trapExceptions is not documented In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21339 --- Comment #1 from Ali Cehreli --- s/2.080/2.082 -- From d-bugmail at puremagic.com Fri Oct 23 01:16:15 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 23 Oct 2020 01:16:15 +0000 Subject: [Issue 21299] [LINK] undefined reference to dmd.root.stringtable.StringValue!(Type).StringValue.lstring() In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21299 --- Comment #9 from Dlang Bot --- dlang/dmd pull request #11896 "Revert "Fix Issue 21299: Undefined reference to dmd.root.stringtable.StringValue!(Type).lstring()"" was merged into stable: - e2e76d744d3f5f46ecf66ae67cf4089c6711be2e by Iain Buclaw: Revert "Fix Issue 21299: Undefined reference to dmd.root.stringtable.StringValue!(Type).lstring()" This reverts commit 32273e82ec9ba3f4022f03e7e12d5d4a384dc3ba. - 74966ae8f8325459df753c3bbe62c54751712ab3 by Iain Buclaw: Issue 21299: Add regression test for another undefined reference issue https://github.com/dlang/dmd/pull/11896 -- From d-bugmail at puremagic.com Fri Oct 23 07:35:03 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 23 Oct 2020 07:35:03 +0000 Subject: [Issue 21299] [LINK] undefined reference to dmd.root.stringtable.StringValue!(Type).StringValue.lstring() In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21299 --- Comment #10 from Dlang Bot --- dlang/dmd pull request #11901 "[dmd-cxx] Issue 21299: Add regression test for another undefined reference issue" was merged into dmd-cxx: - 503316612bd7b70bf0e73930710ef27e3494bf03 by Iain Buclaw: [dmd-cxx] Issue 21299: Add regression test for another undefined reference issue https://github.com/dlang/dmd/pull/11901 -- From d-bugmail at puremagic.com Fri Oct 23 18:47:54 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 23 Oct 2020 18:47:54 +0000 Subject: [Issue 21337] join can iterates ranges multiple times In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21337 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Dlang Bot --- dlang/phobos pull request #7674 "Fix Issue 21337: Join can iterate ranges multiple times" was merged into stable: - 529a28ce185375a793d16a84a4a05b2786af39b4 by Richard Manthorpe: Fix Issue 21337: Join can iterate ranges multiple times https://github.com/dlang/phobos/pull/7674 -- From d-bugmail at puremagic.com Sat Oct 24 00:34:16 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 24 Oct 2020 00:34:16 +0000 Subject: [Issue 17494] Do not execute scope(...) if an Error exception has been thrown In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=17494 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #6 from Dlang Bot --- @WalterBright updated dlang/dmd pull request #6896 "fix Issue 17494 - Do not execute scope(...) if an Error exception has?" fixing this issue: - fix Issue 17494 - Do not execute scope(...) if an Error exception has been thrown https://github.com/dlang/dmd/pull/6896 -- From d-bugmail at puremagic.com Sat Oct 24 02:16:07 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 24 Oct 2020 02:16:07 +0000 Subject: [Issue 14226] invalid Runtime.traceHandler setup In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=14226 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #2 from Dlang Bot --- @kinke updated dlang/druntime pull request #3245 "Fix Issue 14226 - Don't initialize/overwrite global trace handler with each thread" fixing this issue: - Fix Issue 14226 - Don't initialize/overwrite global trace handler with each thread Instead, initialize it once as part of rt_init(). Keep it as a module ctor instead of manually initializing it in rt_init() because `defaultTraceHandler` might depend on other modules and their module ctors; that's the case for Windows, where generating a trace requires the core.sys.windows.stacktrace module ctor to be run first. https://github.com/dlang/druntime/pull/3245 -- From d-bugmail at puremagic.com Sat Oct 24 06:14:16 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 24 Oct 2020 06:14:16 +0000 Subject: [Issue 14226] invalid Runtime.traceHandler setup In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=14226 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Dlang Bot --- dlang/druntime pull request #3245 "Fix Issue 14226 - Don't initialize/overwrite global trace handler with each thread" was merged into master: - afd2d6bbd678e51cd5794e55fea16b7ab6793ab5 by Martin Kinkelin: Fix Issue 14226 - Don't initialize/overwrite global trace handler with each thread Instead, initialize it once as part of rt_init(). Keep it as a module ctor instead of manually initializing it in rt_init() because `defaultTraceHandler` might depend on other modules and their module ctors; that's the case for Windows, where generating a trace requires the core.sys.windows.stacktrace module ctor to be run first. https://github.com/dlang/druntime/pull/3245 -- From d-bugmail at puremagic.com Sat Oct 24 12:16:31 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 24 Oct 2020 12:16:31 +0000 Subject: [Issue 21340] New: extern(C++,) extern(C++, "") and extern(C++,mixin("")) should result in no namespace not an error Message-ID: https://issues.dlang.org/show_bug.cgi?id=21340 Issue ID: 21340 Summary: extern(C++,) extern(C++, "") and extern(C++,mixin("")) should result in no namespace not an error Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: iamthewilsonator at hotmail.com ``` extern(C++) struct A {} extern(C++,) struct A {} extern(C++, "") struct A {} extern(C++,mixin("")) struct A {} ``` should be all equivalent, currently only the first compiles. ``` extern(C++, true ? "ns" : "") struct B {} ``` compiles, but ``` extern(C++, false ? "ns" : "") struct B {} ``` does not. -- From d-bugmail at puremagic.com Sat Oct 24 12:16:51 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 24 Oct 2020 12:16:51 +0000 Subject: [Issue 21340] extern(C++, ) extern(C++, "") and extern(C++, mixin("")) should result in no namespace not an error In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21340 Nicholas Wilson changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |C++ -- From d-bugmail at puremagic.com Sun Oct 25 00:25:37 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 25 Oct 2020 00:25:37 +0000 Subject: [Issue 21340] extern(C++, ) extern(C++, "") and extern(C++, mixin("")) should result in no namespace not an error In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21340 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Dlang Bot --- @thewilsonator created dlang/dmd pull request #11905 "Fix issue 21340- extern(C++,) extern(C++, "") and extern(C++,mixin(""?" fixing this issue: - Fix issue 21340- extern(C++,) extern(C++, "") and extern(C++,mixin("")) should result in no namespace not an error https://github.com/dlang/dmd/pull/11905 -- From d-bugmail at puremagic.com Sun Oct 25 00:32:44 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 25 Oct 2020 00:32:44 +0000 Subject: [Issue 21340] extern(C++, ) extern(C++, "") and extern(C++, mixin("")) should result in no namespace not an error In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21340 Nicholas Wilson changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|pull | --- Comment #2 from Nicholas Wilson --- that should be extern(C++,mixin("\"\"")) struct A {} -- From d-bugmail at puremagic.com Sun Oct 25 03:59:44 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 25 Oct 2020 03:59:44 +0000 Subject: [Issue 21323] (64-bit Windows only) core.stdcpp.vector could not have core.stdcpp.vector as element In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21323 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Dlang Bot --- dlang/druntime pull request #3238 "Fix: core.stdcpp.vector cannot have core.stdcpp.vector as element" was merged into stable: - 43651191e970adb5d8ae7018eb5f2195eeb3695c by Nathan Sashihara: Fix Issue 21323 - (64-bit Windows only) core.stdcpp.vector could not have core.stdcpp.vector as element https://github.com/dlang/druntime/pull/3238 -- From d-bugmail at puremagic.com Sun Oct 25 12:58:34 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 25 Oct 2020 12:58:34 +0000 Subject: [Issue 21341] New: [REG2.092] Wrong reference escape error when parameter is stored in this Message-ID: https://issues.dlang.org/show_bug.cgi?id=21341 Issue ID: 21341 Summary: [REG2.092] Wrong reference escape error when parameter is stored in this Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: regression Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: johanengelen at weka.io ``` struct A { bool delegate() dlg; } struct Watcher { bool b; bool func() const { return b; } } struct S { A[] watchers; void registerWatcher(return ref Watcher watcher) { watchers ~= A(&watcher.func); // line 13 } } S s; Watcher watcher; void foo() { s.registerWatcher(watcher); } ``` Compile with `-w de` and it shows a wrong deprecation message: (13): Deprecation: copying `A(&watcher.func)` into allocated memory escapes a reference to parameter variable `watcher` The `return` on parameter `watcher` means that the reference escapes to the `this` parameter. See spec 19.6.5.4. Happens since dlang 2.092. -- From d-bugmail at puremagic.com Sun Oct 25 12:58:56 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 25 Oct 2020 12:58:56 +0000 Subject: [Issue 21341] [REG2.092] Wrong reference escape error when parameter is stored in this In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21341 johanengelen at weka.io changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |industry, rejects-valid Hardware|x86 |All OS|Mac OS X |All -- From d-bugmail at puremagic.com Sun Oct 25 13:05:24 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 25 Oct 2020 13:05:24 +0000 Subject: [Issue 21341] [REG2.092] Wrong reference escape error when parameter is stored in this In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21341 --- Comment #1 from johanengelen at weka.io --- Workaround: use explicit pointer parameter (`Watcher*`) instead of reference (`ref Watcher`). -- From d-bugmail at puremagic.com Sun Oct 25 15:42:35 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 25 Oct 2020 15:42:35 +0000 Subject: [Issue 21300] C++ header generation produce nonsense code on enum with enum as parent In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21300 moonlightsentinel at disroot.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |moonlightsentinel at disroot.o | |rg Severity|blocker |normal --- Comment #1 from moonlightsentinel at disroot.org --- Reduced to normal because the header file is not required to be compilable. -- From d-bugmail at puremagic.com Sun Oct 25 15:52:50 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 25 Oct 2020 15:52:50 +0000 Subject: [Issue 21300] C++ header generation produce nonsense code on enum with enum as parent In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21300 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #2 from Dlang Bot --- @MoonlightSentinel created dlang/dmd pull request #11906 "dtoh: Don't use enum namespaces as types" fixing this issue: - Fix 21300 - Don't cast to enum emitted as namespace (dtoh) The enum members are declared as variables of the base type, so the cast is redundant anyway. https://github.com/dlang/dmd/pull/11906 -- From d-bugmail at puremagic.com Sun Oct 25 17:38:22 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 25 Oct 2020 17:38:22 +0000 Subject: [Issue 21342] New: Install.sh can not install gdc, can not install ldc. Message-ID: https://issues.dlang.org/show_bug.cgi?id=21342 Issue ID: 21342 Summary: Install.sh can not install gdc, can not install ldc. Product: D Version: D2 Hardware: x86 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: installer Assignee: nobody at puremagic.com Reporter: agilbrt at gmail.com When attempting to install gdc, no gdc is installed. When attempting to install ldc, no ldc is installed. sh> ./install.sh install gdc Downloading and unpacking https://gdcproject.org/downloads/binaries/i686-linux-gnu/gdc-4.8.5.tar.xz ############################################################################################# 100.0%-#O#- # # curl: (22) The requested URL returned error: 404 ############################################################################################# 100.0%-#O#- # # curl: (22) The requested URL returned error: 404 ############################################################################################# 100.0%-#O#- # # curl: (22) The requested URL returned error: 404 ############################################################################################# 100.0%-#O#- # # curl: (22) The requested URL returned error: 404 ############################################################################################# 100.0%-#O#- # # curl: (22) The requested URL returned error: 404 tar (child): /home/ant/dlang/.installer_tmp_ecjwPM/4wFI16/gdc-4.8.5.tar.xz: Cannot open: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now sh> ./install.sh install ldc Downloading and unpacking https://github.com/ldc-developers/ldc/releases/download/v1.24.0/ldc2-1.24.0-linux-x86.tar.xz #=#=-# # curl: (22) The requested URL returned error: 404 Not Found ##O=# # curl: (22) The requested URL returned error: 404 Not Found #=#=-# # curl: (22) The requested URL returned error: 404 Not Found #=#=-# # curl: (22) The requested URL returned error: 404 Not Found ##O=# # curl: (22) The requested URL returned error: 404 Not Found tar (child): /home/ant/dlang/.installer_tmp_693nZC/wMjxIp/ldc2-1.24.0-linux-x86.tar.xz: Cannot open: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now sh> uname -a Linux rattle 4.15.0-121-generic #123-Ubuntu SMP Mon Oct 5 16:16:19 UTC 2020 i686 i686 i686 GNU/Linux -- From d-bugmail at puremagic.com Sun Oct 25 17:38:34 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 25 Oct 2020 17:38:34 +0000 Subject: [Issue 21342] Install.sh can not install gdc, can not install ldc. In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21342 Ant changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |agilbrt at gmail.com -- From d-bugmail at puremagic.com Sun Oct 25 18:38:32 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sun, 25 Oct 2020 18:38:32 +0000 Subject: [Issue 21300] C++ header generation produce nonsense code on enum with enum as parent In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21300 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Dlang Bot --- dlang/dmd pull request #11906 "dtoh: Don't use enum namespaces as types" was merged into master: - dccaf221697979c011f0f0520f8687a970c1f5ff by MoonlightSentinel: Fix 21300 - Don't cast to enum emitted as namespace (dtoh) The enum members are declared as variables of the base type, so the cast is redundant anyway. https://github.com/dlang/dmd/pull/11906 -- From d-bugmail at puremagic.com Mon Oct 26 07:09:38 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Mon, 26 Oct 2020 07:09:38 +0000 Subject: [Issue 21340] extern(C++, (emptyTuple)) should result in no namespace not an error In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21340 Nicholas Wilson changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|extern(C++,) extern(C++, |extern(C++,(emptyTuple)) |"") and |should result in no |extern(C++,mixin("")) |namespace not an error |should result in no | |namespace not an error | -- From d-bugmail at puremagic.com Tue Oct 27 08:49:44 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 27 Oct 2020 08:49:44 +0000 Subject: [Issue 21343] New: When a function takes a tuple created using __parameters, parameters are individually accessible Message-ID: https://issues.dlang.org/show_bug.cgi?id=21343 Issue ID: 21343 Summary: When a function takes a tuple created using __parameters, parameters are individually accessible Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: minor Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: default_357-line at yahoo.de Consider the following code: ``` import std.stdio; import std.traits; void foo(int value) { } static if (is(FunctionTypeOf!foo Params == __parameters)) { void bar(Params params) { writefln!"%s, but %s also works??"(value, params); } } void main() { bar(5); } ``` Note how bar, despite taking a tuple called "params", can also access the individual parameter 'value' from foo. This can cause name collisions when you try to declare a variable called 'value'. Since this is used for metaprogramming, this introduces the risk of name collisions based on parameter names in functions passed to a metaprogramming function, which is quite hard to debug. Since the parameters are already accessible via 'params', the individual parameters should not also be visible inside 'bar'. -- From d-bugmail at puremagic.com Tue Oct 27 12:53:57 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 27 Oct 2020 12:53:57 +0000 Subject: [Issue 21340] extern(C++, (emptyTuple)) should result in no namespace not an error In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21340 --- Comment #3 from Dlang Bot --- @thewilsonator created dlang/dlang.org pull request #2872 "document issue 21340 - extern(C++, (emptyTuple))" mentioning this issue: - document issue 21340 - extern(C++, (emptyTuple)) https://github.com/dlang/dlang.org/pull/2872 -- From d-bugmail at puremagic.com Tue Oct 27 21:11:31 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 27 Oct 2020 21:11:31 +0000 Subject: [Issue 21344] New: core.stdcpp.string.basic_string does not implement opEquals Message-ID: https://issues.dlang.org/show_bug.cgi?id=21344 Issue ID: 21344 Summary: core.stdcpp.string.basic_string does not implement opEquals Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: druntime Assignee: nobody at puremagic.com Reporter: n8sh.secondary at hotmail.com Example code: --- void main() { import core.stdcpp.string : basic_string; char[64] buffer = 'a'; // Make this long enough that short string optimization is not applied. auto s1 = basic_string!char(buffer[]); auto s2 = basic_string!char(buffer[]); assert(s1 == s2); // This assertion fails. } --- -- From d-bugmail at puremagic.com Tue Oct 27 21:56:40 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Tue, 27 Oct 2020 21:56:40 +0000 Subject: [Issue 21344] core.stdcpp.string.basic_string does not implement opEquals In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21344 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Dlang Bot --- @n8sh updated dlang/druntime pull request #3254 "Fix - core.stdcpp.string.basic_string does not implement opEquals" fixing this issue: - Fix Issue 21344 - core.stdcpp.string.basic_string does not implement opEquals https://github.com/dlang/druntime/pull/3254 -- From d-bugmail at puremagic.com Wed Oct 28 05:05:23 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 28 Oct 2020 05:05:23 +0000 Subject: [Issue 21345] New: [C++, posix] different mangling between string and non-string namespace in "std" Message-ID: https://issues.dlang.org/show_bug.cgi?id=21345 Issue ID: 21345 Summary: [C++,posix] different mangling between string and non-string namespace in "std" Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: iamthewilsonator at hotmail.com version(UseString) { extern(C++, `std`) void a(){} pragma(msg, a.mangleof);// _ZSt1av } else { extern(C++, std) void a(){} pragma(msg, a.mangleof);// _ZNSt1bEv } Not sure which one is the correct one, but they should both be the same. -- From d-bugmail at puremagic.com Wed Oct 28 07:24:00 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 28 Oct 2020 07:24:00 +0000 Subject: [Issue 21346] New: core.stdcpp.vector.vector does not implement opEquals Message-ID: https://issues.dlang.org/show_bug.cgi?id=21346 Issue ID: 21346 Summary: core.stdcpp.vector.vector does not implement opEquals Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: normal Priority: P1 Component: druntime Assignee: nobody at puremagic.com Reporter: n8sh.secondary at hotmail.com Someone familiar with C++ would expect == between vectors to be an elementwise comparison. Code: --- void main() { import core.stdcpp.vector : vector; // Currently only supported on 64-bit Windows. vector!int a = [1, 2, 3]; vector!int b = a; assert(a == b); // Fails. } --- -- From d-bugmail at puremagic.com Wed Oct 28 07:56:13 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 28 Oct 2020 07:56:13 +0000 Subject: [Issue 21346] core.stdcpp.vector.vector does not implement opEquals In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21346 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Dlang Bot --- @n8sh created dlang/druntime pull request #3255 "Fix - core.stdcpp.vector.vector does not implement opEquals" fixing this issue: - Fix Issue 21346 - core.stdcpp.vector.vector does not implement opEquals https://github.com/dlang/druntime/pull/3255 -- From d-bugmail at puremagic.com Wed Oct 28 16:20:43 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Wed, 28 Oct 2020 16:20:43 +0000 Subject: [Issue 6484] compose can't take multi arg functions In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=6484 Paul Backus changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |snarwin+bugzilla at gmail.com --- Comment #4 from Paul Backus --- This bug still exists in 2.094.0. The example in comment 3 fails to compile, with the following output: --- bug.d(7): Error: template `std.functional.compose!(f, compose).compose` cannot deduce function from argument types `!()(int, int, int)`, candidates are: /usr/include/dmd/phobos/std/functional.d(1161): `compose(E)(E a)` bug.d(7): while evaluating: `static assert(compose(E)(E a)(1, 2, 3) == f(g(h(1, 2, 3))))` --- -- From d-bugmail at puremagic.com Thu Oct 29 01:55:14 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 29 Oct 2020 01:55:14 +0000 Subject: [Issue 6484] compose can't take multi arg functions In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=6484 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #5 from Dlang Bot --- @pbackus created dlang/phobos pull request #7685 "Fix issue 6484 - compose can't take multi arg functions" fixing this issue: - Fix issue 6484 - compose can't take multi arg functions https://github.com/dlang/phobos/pull/7685 -- From d-bugmail at puremagic.com Thu Oct 29 02:10:44 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 29 Oct 2020 02:10:44 +0000 Subject: [Issue 21347] New: std.functional.adjoin should work in BetterC Message-ID: https://issues.dlang.org/show_bug.cgi?id=21347 Issue ID: 21347 Summary: std.functional.adjoin should work in BetterC Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: phobos Assignee: nobody at puremagic.com Reporter: snarwin+bugzilla at gmail.com Example program: --- extern(C) int main() { import std.functional: adjoin; alias f = (int n) => n + 1; alias g = (int n) => n + 2; alias h = (int n) => n + 3; alias i = (int n) => n + 4; auto result = adjoin!(f, g, h, i)(0); assert(result[0] == 1); assert(result[1] == 2); assert(result[2] == 3); assert(result[3] == 4); return 0; } --- Compiler output: --- $ dmd -betterC bug.d /usr/include/dmd/phobos/std/array.d(3243): Error: TypeInfo cannot be used with -betterC $ dmd --version DMD64 D Compiler v2.094.0 --- Note that due to details of the current implementation, only calls to adjoin with 4 or more template arguments are affected as of Phobos 2.094.0. -- From d-bugmail at puremagic.com Thu Oct 29 02:34:52 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 29 Oct 2020 02:34:52 +0000 Subject: [Issue 6484] compose can't take multi arg functions In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=6484 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #6 from Dlang Bot --- dlang/phobos pull request #7685 "Fix issue 6484 - compose can't take multi arg functions" was merged into master: - 4083852b4b3637595d1a35eb85fc97b7dcc6ced0 by Paul Backus: Fix issue 6484 - compose can't take multi arg functions https://github.com/dlang/phobos/pull/7685 -- From d-bugmail at puremagic.com Thu Oct 29 03:01:57 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 29 Oct 2020 03:01:57 +0000 Subject: [Issue 21347] std.functional.adjoin should work in BetterC In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21347 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Dlang Bot --- @pbackus created dlang/phobos pull request #7686 "Fix issue 21347 - std.functional.adjoin should work in BetterC" fixing this issue: - Fix issue 21347 - std.functional.adjoin should work in BetterC https://github.com/dlang/phobos/pull/7686 -- From d-bugmail at puremagic.com Thu Oct 29 03:45:21 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 29 Oct 2020 03:45:21 +0000 Subject: [Issue 21347] std.functional.adjoin should work in BetterC In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21347 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Dlang Bot --- dlang/phobos pull request #7686 "Fix issue 21347 - std.functional.adjoin should work in BetterC" was merged into master: - 8719a5fb9e3f455bff29a7aba0cb9aad5ae50b57 by Paul Backus: Fix issue 21347 - std.functional.adjoin should work in BetterC https://github.com/dlang/phobos/pull/7686 -- From d-bugmail at puremagic.com Thu Oct 29 04:26:02 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 29 Oct 2020 04:26:02 +0000 Subject: [Issue 21348] New: Nested function can't return inout without inout parameter Message-ID: https://issues.dlang.org/show_bug.cgi?id=21348 Issue ID: 21348 Summary: Nested function can't return inout without inout parameter Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: snarwin+bugzilla at gmail.com Example program: --- struct S { int i; } inout(S) fun(inout(int) i) { auto nested() { return inout(S)(i); } return nested(); } --- Compiler output from DMD 2.094.0: --- $ dmd -c bug.d bug.d(5): Error: inout on return means inout must be on a parameter as well for pure nothrow @nogc @safe inout(S)() --- -- From d-bugmail at puremagic.com Thu Oct 29 15:56:10 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 29 Oct 2020 15:56:10 +0000 Subject: [Issue 21349] New: copy and postblit constructors aren't compatible Message-ID: https://issues.dlang.org/show_bug.cgi?id=21349 Issue ID: 21349 Summary: copy and postblit constructors aren't compatible Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: blocker Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: ilyayaroshenko at gmail.com struct SNew { int s; this(ref return scope inout SNew rhs) inout { this.s = rhs.s + 1; pragma(inline, false); } } struct SOld { int s; this(this) { this.s++; pragma(inline, false); } } struct C { SOld sOld; SNew sNew; this(this) { pragma(inline, false); } } void main() { C c; auto d = c; assert(d.sOld.s); assert(d.sNew.s); } -- From d-bugmail at puremagic.com Thu Oct 29 16:14:58 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 29 Oct 2020 16:14:58 +0000 Subject: [Issue 21349] copy and postblit constructors aren't compatible In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21349 --- Comment #1 from ???? ???????? --- The last assert fails -- From d-bugmail at puremagic.com Thu Oct 29 16:17:59 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 29 Oct 2020 16:17:59 +0000 Subject: [Issue 21350] New: [TestSuite] Failure of test/unit/frontend.d shows as "TARGET: ." Message-ID: https://issues.dlang.org/show_bug.cgi?id=21350 Issue ID: 21350 Summary: [TestSuite] Failure of test/unit/frontend.d shows as "TARGET: ." Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: TestSuite Severity: normal Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: pro.mathias.lang at gmail.com I've seen the following failure in the CI: ``` Failed to execute the `unit` test executable! (exit code 1) > /home/circleci/dmd/generated/linux/debug/64/dmd @/home/circleci/dmd/test/test_results/cmdfile > /home/circleci/dmd/test/test_results/runner test.d(1): Error: Built-in hex string literals are obsolete, use `std.conv.hexString!"61"` instead. test.d(1): Error: declaration expected following attribute, not end of file test.d(1): Error: declaration expected following attribute, not end of file test.d(1): Error: declaration expected following attribute, not end of file test.d(1): Error: declaration expected following attribute, not end of file Failures: 1) parseModule - custom AST family core.exception.AssertError@/home/circleci/dmd/test/unit/frontend.d(63): unittest failure ---------------- src/core/exception.d:447 onAssertErrorMsg [0x557bdf5a00fb] src/core/exception.d:464 onUnittestErrorMsg [0x557bdf5a017d] src/core/exception.d:608 _d_unittest_msg [0x557bdf573228] src/core/exception.d:613 _d_unittest [0x557bdf573269] src/core/exception.d:603 _d_unittestp [0x557bdf5731e1] /home/circleci/dmd/test/unit/frontend.d:63 void frontend.__unittest_L14_C1() [0x557bdf2edf9d] /home/circleci/dmd/test/test_results/runner.d:160 core.runtime.UnitTestResult runner.unitTestRunner() [0x557bdf3054c6] src/core/runtime.d:598 runModuleUnitTests [0x557bdf5a0602] src/rt/dmain2.d:552 void rt.dmain2._d_run_main2(char[][], ulong, extern (C) int function(char[][])*).runAll() [0x557bdf576305] src/rt/dmain2.d:526 void rt.dmain2._d_run_main2(char[][], ulong, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x557bdf576280] src/rt/dmain2.d:585 _d_run_main2 [0x557bdf5761e5] src/rt/dmain2.d:379 _d_run_main [0x557bdf575f12] /home/circleci/dmd/generated/linux/debug/64/../../../../../druntime/import/core/internal/entrypoint.d:29 main [0x557bdf314e65] ??:? __libc_start_main [0x7fb3dd2fcb96] ??:? _start [0x557bdf2a6d69] 232 tests, 1 failures Failed tests: /home/circleci/dmd/test/unit/frontend.d:63 >>> TARGET FAILED: .Failed to execute the `unit` test executable! (exit code 1) > /home/circleci/dmd/generated/linux/debug/64/dmd @/home/circleci/dmd/test/test_results/cmdfile > /home/circleci/dmd/test/test_results/runner test.d(1): Error: Built-in hex string literals are obsolete, use `std.conv.hexString!"61"` instead. test.d(1): Error: declaration expected following attribute, not end of file test.d(1): Error: declaration expected following attribute, not end of file test.d(1): Error: declaration expected following attribute, not end of file test.d(1): Error: declaration expected following attribute, not end of file Failures: 1) parseModule - custom AST family core.exception.AssertError@/home/circleci/dmd/test/unit/frontend.d(63): unittest failure ---------------- src/core/exception.d:447 onAssertErrorMsg [0x557bdf5a00fb] src/core/exception.d:464 onUnittestErrorMsg [0x557bdf5a017d] src/core/exception.d:608 _d_unittest_msg [0x557bdf573228] src/core/exception.d:613 _d_unittest [0x557bdf573269] src/core/exception.d:603 _d_unittestp [0x557bdf5731e1] /home/circleci/dmd/test/unit/frontend.d:63 void frontend.__unittest_L14_C1() [0x557bdf2edf9d] /home/circleci/dmd/test/test_results/runner.d:160 core.runtime.UnitTestResult runner.unitTestRunner() [0x557bdf3054c6] src/core/runtime.d:598 runModuleUnitTests [0x557bdf5a0602] src/rt/dmain2.d:552 void rt.dmain2._d_run_main2(char[][], ulong, extern (C) int function(char[][])*).runAll() [0x557bdf576305] src/rt/dmain2.d:526 void rt.dmain2._d_run_main2(char[][], ulong, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x557bdf576280] src/rt/dmain2.d:585 _d_run_main2 [0x557bdf5761e5] src/rt/dmain2.d:379 _d_run_main [0x557bdf575f12] /home/circleci/dmd/generated/linux/debug/64/../../../../../druntime/import/core/internal/entrypoint.d:29 main [0x557bdf314e65] ??:? __libc_start_main [0x7fb3dd2fcb96] ??:? _start [0x557bdf2a6d69] 232 tests, 1 failures Failed tests: /home/circleci/dmd/test/unit/frontend.d:63 >>> TARGET FAILED: . ``` The issue is that the target name is not helpful. Since tests runs in parallel, this can trigger early on, and the test-suite will continue to run, until a few hundreds lines later it prints: ``` [...] ... fail_compilation/fail3882.d -verrors=0 -w -fPIC (-debug) FAILED targets: - . Exited with code exit status 1 ``` Which forces the user to needlessly scroll up. -- From d-bugmail at puremagic.com Thu Oct 29 16:59:20 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 29 Oct 2020 16:59:20 +0000 Subject: [Issue 21349] copy and postblit constructors aren't compatible In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21349 Paul Backus changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |snarwin+bugzilla at gmail.com Severity|blocker |enhancement --- Comment #2 from Paul Backus --- This is an enhancement request, not a bug. Per the language spec: > For backward compatibility reasons, a struct that defines both a copy > constructor and a postblit will only use the postblit for implicit copying. Source: https://dlang.org/spec/struct.html#struct-postblit You can work around this by placing sOld in a union, since unions do not have generated postblits: struct C { union { SOld sOld; } SNew sNew; this(ref C other) { pragma(inline, false); sOld = other.sOld; sNew = other.sNew; } } Of course, if SOld has any other special member functions, such as a destructor or identity opAssign overload, you will have to implement those manually for C as well. -- From d-bugmail at puremagic.com Thu Oct 29 17:04:51 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 29 Oct 2020 17:04:51 +0000 Subject: [Issue 21349] copy and postblit constructors aren't compatible In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21349 --- Comment #3 from ???? ???????? --- well. The language spec is buggy. -- From d-bugmail at puremagic.com Thu Oct 29 17:09:06 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 29 Oct 2020 17:09:06 +0000 Subject: [Issue 21349] copy and postblit constructors aren't compatible In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21349 --- Comment #4 from ???? ???????? --- btw, I don't see whare spec says that an aggregate can't hold both old and new style members struct C { SOld sOld; SNew sNew; } void main() { C c; auto d = c; assert(d.sOld.s); assert(d.sNew.s); } This is a buggy definition too and doesn't pass second assert too. The spec doesn't say that this shouldn't work. It just ignores this case. But this is definitely the language design bug. -- From d-bugmail at puremagic.com Thu Oct 29 17:09:16 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 29 Oct 2020 17:09:16 +0000 Subject: [Issue 21349] copy and postblit constructors aren't compatible In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21349 ???? ???????? changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |blocker -- From d-bugmail at puremagic.com Thu Oct 29 17:16:16 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 29 Oct 2020 17:16:16 +0000 Subject: [Issue 21349] copy and postblit constructors aren't compatible In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21349 --- Comment #5 from Paul Backus --- When an aggregate has both old and new style members, the compiler generates both a copy constructor and a postblit, and the postblit takes precedence. I agree that this is a bug in the language design: the generated copy constructor will call the members' postblits, so it should be the one that takes precedence. -- From d-bugmail at puremagic.com Thu Oct 29 17:25:29 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Thu, 29 Oct 2020 17:25:29 +0000 Subject: [Issue 21349] copy and postblit constructors aren't compatible In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21349 --- Comment #6 from ???? ???????? --- I have thought think about these lines > For backward compatibility reasons, a struct that defines both a copy > constructor and a postblit will only use the postblit for implicit copying. What they are really about? First, they say about "struct that defines both ", but in the second case the struct doesn't define neither. The compiler generates something, and we can suppose that compiler can generate something good. For example a new style copy constructor. And it should generate it instead of postblit. Why? because the second: Second, "For backward compatibility reasons". The reason is backward compatibility, not something else. I mean that "struct that defines both" should be understood as "struct that _explicilty_ defines both". So, even with the current spec, this can work, and if it can work, then it should work. -- From d-bugmail at puremagic.com Fri Oct 30 13:09:32 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 30 Oct 2020 13:09:32 +0000 Subject: [Issue 21351] New: When struct A is imported inside struct B, with(B) gets passed to A() constructor. Message-ID: https://issues.dlang.org/show_bug.cgi?id=21351 Issue ID: 21351 Summary: When struct A is imported inside struct B, with(B) gets passed to A() constructor. Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: default_357-line at yahoo.de Consider these three files: --- a.d struct A { int value; } --- b.d struct B { import a : A; } --- test.d void main() { with (B()) A(0); } DMD will say: test.d(5): Error: cannot implicitly convert expression __withSym of type B* to int Despite B() not being necessary or allowed for A(). -- From d-bugmail at puremagic.com Fri Oct 30 14:10:46 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Fri, 30 Oct 2020 14:10:46 +0000 Subject: [Issue 21351] When struct A is imported inside struct B, with(B) gets passed to A() constructor. In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21351 Mario Kroeplin changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |industry CC| |kroeplin.d at googlemail.com -- From d-bugmail at puremagic.com Sat Oct 31 01:29:05 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 31 Oct 2020 01:29:05 +0000 Subject: [Issue 21346] core.stdcpp.vector.vector does not implement opEquals In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21346 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Dlang Bot --- dlang/druntime pull request #3255 "Fix - core.stdcpp.vector.vector does not implement opEquals" was merged into stable: - b65703e477344e5702f5eaa3897a4a99cb1700be by Nathan Sashihara: Fix Issue 21346 - core.stdcpp.vector.vector does not implement opEquals https://github.com/dlang/druntime/pull/3255 -- From d-bugmail at puremagic.com Sat Oct 31 01:54:00 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 31 Oct 2020 01:54:00 +0000 Subject: [Issue 21253] Can't compile Variant.visit!(...) with generic function In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21253 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Dlang Bot --- dlang/phobos pull request #7637 "Fix issue 21253 - Can't compile Variant.visit!(...) with generic func?" was merged into master: - f3b20bfbf69466c20339c88bd17125cc2ed652d2 by Simen Kj?r?s: Fix issue 21253 - Can't compile Variant.visit!(...) with generic function https://github.com/dlang/phobos/pull/7637 -- From d-bugmail at puremagic.com Sat Oct 31 08:47:03 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 31 Oct 2020 08:47:03 +0000 Subject: [Issue 21352] New: enum members should not be given UDAs of type Message-ID: https://issues.dlang.org/show_bug.cgi?id=21352 Issue ID: 21352 Summary: enum members should not be given UDAs of type Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody at puremagic.com Reporter: zan77137 at nifty.com This code is broken: -------------------------------- @("aaa") enum Hoge { @("bbb") foo, // tuple("aaa", "bbb") -> should be only tuple("bbb") bar, // tuple() } @("aaa") struct Fuga { @("bbb") int foo; // tuple("bbb") int bar; // tuple() } static assert([__traits(getAttributes, Hoge.foo)] == ["bbb"]); //NG static assert([__traits(getAttributes, Hoge.bar)] == []); static assert([__traits(getAttributes, Fuga.foo)] == ["bbb"]); static assert([__traits(getAttributes, Fuga.bar)] == []); -------------------------------- -- From d-bugmail at puremagic.com Sat Oct 31 08:53:26 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 31 Oct 2020 08:53:26 +0000 Subject: [Issue 21352] enum members should not be given UDAs of its parent enum declaration In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21352 Basile-z changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|enum members should not be |enum members should not be |given UDAs of type |given UDAs of its parent | |enum declaration --- Comment #1 from Basile-z --- I hope the new title is ok as the old one was slightly ambiguous -- From d-bugmail at puremagic.com Sat Oct 31 11:37:28 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 31 Oct 2020 11:37:28 +0000 Subject: [Issue 21352] enum members should not be given UDAs of its parent enum declaration In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21352 Dlang Bot changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #2 from Dlang Bot --- @BorisCarvajal created dlang/dmd pull request #11917 "Fix Issue 21352 - enum members should not be given UDAs of its parent?" fixing this issue: - Fix Issue 21352 - enum members should not be given UDAs of its parent enum declaration https://github.com/dlang/dmd/pull/11917 -- From d-bugmail at puremagic.com Sat Oct 31 12:11:23 2020 From: d-bugmail at puremagic.com (d-bugmail at puremagic.com) Date: Sat, 31 Oct 2020 12:11:23 +0000 Subject: [Issue 21351] When struct A is imported inside struct B, with(B) gets passed to A() constructor. In-Reply-To: References: Message-ID: https://issues.dlang.org/show_bug.cgi?id=21351 Boris Carvajal changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |boris2.9 at gmail.com --- Comment #1 from Boris Carvajal --- This code should error about 'A' not being found in 'B' because imports are private by default. For example: void main() { B().A(0); } // prints: 'Error: no property A for type b.B' or using a type instead of a symbol in 'with' statement: void main() { with (B) A(0); } // same error You can make it work by changing: struct B { import a : A; } to: struct B { public import a : A; } I will try to fix the error but I'm not sure whether to change the bug subject or file a new one. --