[Issue 18312] New: string concatenation with -betterC fails with linker errors
https://issues.dlang.org/show_bug.cgi?id=18312 Issue ID: 18312 Summary: string concatenation with -betterC fails with linker errors Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: slavo5...@yahoo.com void main() { scope string s; s = "`" ~ s ~ "`"; } Compile with the -betterC flag onlineapp.d:4: error: undefined reference to '_D12TypeInfo_Aya6__initZ' onlineapp.d:4: error: undefined reference to '_d_arraycatnTX' onlineapp.o:onlineapp.d:function main: error: undefined reference to '_d_run_main' collect2: error: ld returned 1 exit status Error: linker exited with status 1 --
[Issue 8295] Struct member destructor can not be called from shared struct instance
https://issues.dlang.org/show_bug.cgi?id=8295 Atila Neves changed: What|Removed |Added CC||jlqu...@optonline.net --- Comment #6 from Atila Neves --- *** Issue 6804 has been marked as a duplicate of this issue. *** --
[Issue 6804] shared File doesn't compile
https://issues.dlang.org/show_bug.cgi?id=6804 Atila Neves changed: What|Removed |Added Status|NEW |RESOLVED CC||atila.ne...@gmail.com Resolution|--- |DUPLICATE --- Comment #2 from Atila Neves --- *** This issue has been marked as a duplicate of issue 8295 *** --
[Issue 18313] New: Default initializer for class isn't always called
https://issues.dlang.org/show_bug.cgi?id=18313 Issue ID: 18313 Summary: Default initializer for class isn't always called Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: major Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: skoczn...@gmail.com When working with dlib library (gamedev oriented library) I've noticed a strange behaviour, which seems unexpected to me: For this example code (add "dlib": "~>0.12.2" to dub dependency to build): import std.stdio; import dlib.math; class Foo { Matrix4f mat1; Matrix4f mat2 = Matrix4f.zero(); Quaternionf q1; Quaternionf q2 = Quaternionf.identity();; } void main() { Foo foo = new Foo(); writeln(foo.mat1); writeln(foo.mat2); writeln(foo.q1); writeln(foo.q2); Matrix4f mat3; Matrix4f mat4 = Matrix4f.zero(); writeln(mat3); writeln(mat4); } The expectation is that foo.mat2 gets initialized to Matrix4f.zero() value, just like it works with foo.q2 and mat4 variable. But for some reason, foo.mat2 stays uninitialized (filled with NaNs rather than zeroes). --
[Issue 18314] New: std.traits.getSymbolsByUDA only considers the first symbol of an overload set
https://issues.dlang.org/show_bug.cgi?id=18314 Issue ID: 18314 Summary: std.traits.getSymbolsByUDA only considers the first symbol of an overload set Product: D Version: D2 Hardware: x86_64 OS: All Status: NEW Severity: normal Priority: P1 Component: phobos Assignee: nob...@puremagic.com Reporter: dechcaudron+dlang.issue.track...@protonmail.com Consider the following code: ``` enum lol; enum lal; struct A { @lal void foo(); @lol void foo(int a); } void main() { pragma(msg, "Tagged with @lal:"); static foreach(alias member; getSymbolsByUDA!(A, lal)) { pragma(msg, __traits(identifier, member)); } pragma(msg, "Tagged with @lol:"); static foreach(alias member; getSymbolsByUDA!(A, lol)) { pragma(msg, __traits(identifier, member)); } } ``` When building, `foo` only shows up in the first foreach, not in the second one. --
[Issue 18315] New: wrong code for `i > 0`
https://issues.dlang.org/show_bug.cgi?id=18315 Issue ID: 18315 Summary: wrong code for `i > 0` Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: critical Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: ag0ae...@gmail.com Found by kdevel who posted to D.learn: https://forum.dlang.org/post/nbcmkpeyfoqljulmf...@forum.dlang.org void main () { int i = int.min; bool b = i > 0; assert(!b); /* fails */ } --
[Issue 18315] wrong code for `i > 0`
https://issues.dlang.org/show_bug.cgi?id=18315 ag0ae...@gmail.com changed: What|Removed |Added Keywords||wrong-code --- Comment #1 from ag0ae...@gmail.com --- Whoops. Accidentally hit "submit". This is what dmd generates for `i > 0`: neg EAX shr EAX,01Fh In D: `(-i) >> 31`. That code assumes that negation always flips the sign bit. But it doesn't for `int.min`. `-int.min` is `int.min` again. --
[Issue 18315] wrong code for `i > 0`
https://issues.dlang.org/show_bug.cgi?id=18315 Steven Schveighoffer changed: What|Removed |Added OS|Linux |All --- Comment #3 from Steven Schveighoffer --- Also fails on MacosX. --
[Issue 18315] wrong code for `i > 0`
https://issues.dlang.org/show_bug.cgi?id=18315 Steven Schveighoffer changed: What|Removed |Added CC||schvei...@yahoo.com --- Comment #2 from Steven Schveighoffer --- Wow, this is really old. Tested all the way back to 2.040, still fails. --
[Issue 18315] wrong code for `i > 0`
https://issues.dlang.org/show_bug.cgi?id=18315 Vladimir Panteleev changed: What|Removed |Added Hardware|x86_64 |All --
[Issue 18315] wrong code for `i > 0`
https://issues.dlang.org/show_bug.cgi?id=18315 Stefan changed: What|Removed |Added CC||kde...@vogtner.de --
[Issue 18316] New: std.net.curl.SMTP.mailTo fails to compile
https://issues.dlang.org/show_bug.cgi?id=18316 Issue ID: 18316 Summary: std.net.curl.SMTP.mailTo fails to compile Product: D Version: D2 Hardware: All OS: Windows Status: NEW Severity: regression Priority: P1 Component: phobos Assignee: nob...@puremagic.com Reporter: zan77...@nifty.com Following code doesn't work: --- void main() { // from example of https://dlang.org/phobos/std_net_curl.html#.SMTP import std.net.curl; // Send an email with SMTPS auto smtp = SMTP("smtps://smtp.gmail.com"); smtp.setAuthentication("from.a...@gmail.com", "password"); smtp.mailTo = [""]; // <-- NG smtp.mailFrom = ""; smtp.message = "Example Message"; smtp.perform(); } -- $ dmd -run main P:\app\dmd\bin64\..\import\std\net\curl.d(4055): Error: no property tempCString for type const(char)[] main.d(8): Error: template instance std.net.curl.SMTP.mailTo!() error instantiat ing -- This is probably caused by this commit: https://github.com/dlang/phobos/commit/ca0777a1a7a2ae9cc6f287a6fe8482e61047afb2 mailTo seems to be left out of these changes. --
[Issue 18317] New: Binop quirks in AST (wrt. typeof(null) and AA) incl. safety hole
https://issues.dlang.org/show_bug.cgi?id=18317 Issue ID: 18317 Summary: Binop quirks in AST (wrt. typeof(null) and AA) incl. safety hole Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: ki...@gmx.net I've just learned that the following is apparently valid code (in the context of analyzing a reported LDC issue, https://github.com/ldc-developers/ldc/issues/2537): void main() @safe { typeof(null) nul; void* ptr; int[string] aa = [ "one": 123 ]; static assert(!__traits(compiles, ptr + ptr)); auto sum = nul + nul; auto diff = nul - nul; static assert(!__traits(compiles, aa + aa)); static assert(!__traits(compiles, aa + ptr)); static assert(!__traits(compiles, ptr + aa)); assert(aa + nul == aa); assert(nul + aa == aa); static assert(!__traits(compiles, aa - aa)); static assert(!__traits(compiles, aa - ptr)); static assert(!__traits(compiles, ptr - aa)); assert(aa - nul == aa); assert(nul - aa == aa); } Firstly, these weird binop expressions make it into the AST, so the backend needs to handle stuff like that. If `nul + nul` etc. is really supposed to be valid, the front-end could rewrite the binop as CommaExp `lhs, rhs, typeof(null).init`. And while `aa + aa` is invalid, `aa + nul` makes it into the AST as `aa + cast(int[string]) nul`, so that the backend needs to handle additions and subtractions of associative arrays (semantics?! :D). Secondly, the last assert leads to a segfault in this @safe code during AA comparison, as `nul - aa` yields (a pointer to) an invalid AA, so DMD appears to have chosen pointer subtraction as semantics for AA subtraction. --
[Issue 18318] New: std.net.curl.download silently ignores non-2xx http statuses
https://issues.dlang.org/show_bug.cgi?id=18318 Issue ID: 18318 Summary: std.net.curl.download silently ignores non-2xx http statuses Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: major Priority: P5 Component: phobos Assignee: nob...@puremagic.com Reporter: c...@dawg.eu cat > bug.d << CODE import std.net.curl; void main() { // get("dlang.org/non-existent-foobar"); // throws HTTPStatusException 404 download("dlang.org/non-existent-foobar", "tmp"); // silently writes 404 response, with no way to detect the error } CODE dmd -run bug --
[Issue 18318] std.net.curl.download silently ignores non-2xx http statuses
https://issues.dlang.org/show_bug.cgi?id=18318 --- Comment #1 from Martin Nowak --- I does throw a CurlException for things like timeouts, connection-failures, or ssl issues. --
[Issue 16739] switch ignores case
https://issues.dlang.org/show_bug.cgi?id=16739 ag0ae...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |WORKSFORME --- Comment #4 from ag0ae...@gmail.com --- Works for me now with 2.078.0. Pull request to add a test: https://github.com/dlang/dmd/pull/7793 --
[Issue 8864] Simpler syntax for array literal of structs from one argument
https://issues.dlang.org/show_bug.cgi?id=8864 Andrei Alexandrescu changed: What|Removed |Added Status|NEW |RESOLVED CC||and...@erdani.com Resolution|--- |WONTFIX --- Comment #5 from Andrei Alexandrescu --- This is a core language change with many risks associated. A DIP would need to discuss them all. Workarounds are possible with library code: void main() { BigInt[] data1 = makeArray!BigInt(5, 6, 9); Ranged!(int,5,10)[] data2 = makeArray!(Ranged!(int,5,10))(5, 6, 9); Nibble[] data3 = makeArray!Nibble[1, 2, 15]; // Nibble.sizeof == 1 alias Typedef!int Mint; Mint[] data4 = makeArray!Mint(5, 6, 9); } Within the current language this is possible although not super handy: BigInt[] data1 = only(5, 6, 9).map!(x => BigInt(x)).array; --
[Issue 18319] New: std.exception: enforce example does not compile
https://issues.dlang.org/show_bug.cgi?id=18319 Issue ID: 18319 Summary: std.exception: enforce example does not compile Product: D Version: D2 Hardware: Other OS: Other Status: NEW Severity: normal Priority: P1 Component: dlang.org Assignee: nob...@puremagic.com Reporter: kde...@vogtner.de The code ``` auto f = enforce(fopen("data.txt")); auto line = readln(f); enforce(line.length, "Expected a non-empty line."); ``` from - https://dlang.org/phobos/std_exception.html#enforce, and - https://dlang.org/library/std/exception/enforce.html does not compile in any way. https://forum.dlang.org/thread/ijtvcytskeswqtmlf...@forum.dlang.org#post-mailman.2691.1517085253.9493.digitalmars-d-learn:40puremagic.com --
[Issue 18316] std.net.curl.SMTP.mailTo fails to compile
https://issues.dlang.org/show_bug.cgi?id=18316 --- Comment #1 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/80f4709a980f9b5899b46063aa926e33bd2426bf Fix Issue 18316 - std.net.curl.SMTP.mailTo fails to compile https://github.com/dlang/phobos/commit/5e04cb855f7dbf34ed42e5af1ddb6316f9aca157 Merge pull request #6079 from shoo/fix_Issue18316 Fix Issue 18316 - std.net.curl.SMTP.mailTo fails to compile --
[Issue 18320] New: forum.dlang.org email client should include url pointing to forum msg at bottom of each email, cf github issues
https://issues.dlang.org/show_bug.cgi?id=18320 Issue ID: 18320 Summary: forum.dlang.org email client should include url pointing to forum msg at bottom of each email, cf github issues Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: enhancement Priority: P1 Component: dlang.org Assignee: nob...@puremagic.com Reporter: timothee.co...@gmail.com when reading github notifications (eg someone replied on an issue i'm subscribed to) in gmail, I get at the bottom of the msg something like: ``` You are receiving this because you were mentioned. Reply to this email directly, [view it on GitHub](url ...), or [mute the thread](...). `` could we have something similar for emails from forum.dlang.org (cf Seb via Digitalmars-d via gmail.com ) This is quite convenient to go back to forum without having to search msg in forum.dlang.org, or to share the link with someone. --
[Issue 16467] templated function default argument take into account when not needed
https://issues.dlang.org/show_bug.cgi?id=16467 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --
[Issue 16739] switch ignores case
https://issues.dlang.org/show_bug.cgi?id=16739 ag0ae...@gmail.com changed: What|Removed |Added Keywords|wrong-code | Component|dmd |druntime Resolution|WORKSFORME |FIXED --- Comment #5 from ag0ae...@gmail.com --- Apparently this was actually a Druntime bug, and it was fixed by https://github.com/dlang/druntime/pull/1952 New PR for the test: https://github.com/dlang/druntime/pull/2064 --
[Issue 17036] Template default parameter does not works correctly
https://issues.dlang.org/show_bug.cgi?id=17036 Seb changed: What|Removed |Added CC||greensunn...@gmail.com Summary|Template default parametr |Template default parameter |does not works correctly|does not works correctly --- Comment #3 from Seb --- Here's another example: ``` struct Foo {} struct Bar {} Foo foo; void myFun(D)(D d = foo){} void bar() { myFun(); // works myFun(Bar()); // error } ``` --
[Issue 18208] ddemangle RangeError@src/core/demangle.d(230)
https://issues.dlang.org/show_bug.cgi?id=18208 Timothee Cour changed: What|Removed |Added CC||timothee.co...@gmail.com --- Comment #1 from Timothee Cour --- just ran into that why doing: git clone https://github.com/dlang-community/D-Scanner && cd D-Scanner && dub build && nm bin/dscanner|ddemangle After reduction here's a symbol that triggers (see below). In addition to fixing this bug, we should make demangle inner loop protected via a try/catch so that demangle keeps going till end of stdin, and then rethrow error at the end (at least as an option ddemangle --keep-going-on-error) ``` echo _D3std4conv__T10emplaceRefTSQBa12experimental5lexer__T14TokenStructureThVAyaa305_0a20202020737472696e6720636f6d6d656e743b0a20202020737472696e6720747261696c696e67436f6d6d656e743b0a0a20202020696e74206f70436d702873697a655f7420692920636f6e73742070757265206e6f7468726f77204073616665207b0a202020202020202069662028696e646578203c2069292072657475726e202d313b0a202020202020202069662028696e646578203e2069292072657475726e20313b0a202020202020202072657475726e20303b0a202020207d0a0a20202020696e74206f70436d702872656620636f6e737420747970656f66287468697329206f746865722920636f6e73742070757265206e6f7468726f77204073616665207b0a202020202020202072657475726e206f70436d70286f746865722e696e646578293b0a202020207d0aZQYoTQZtTQZxZQBAoFKQBAhKQBAmZ1S11__xopEqualsFKxSQBCjQBCj__TQBCiTQBCaTQBCfTQBCkZQBDcFKQBCvKQBDaZQCoKxQCbZb | ddemangle core.exception.RangeError@src/core/demangle.d(230): Range violation 4 ddemangle 0x000104b1fece _d_arrayboundsp + 110 5 ddemangle 0x000104b18ad7 pure @safe char[] core.demangle.Demangle!(core.demangle.NoHooks).Demangle.append(const(char)[]) + 483 6 ddemangle 0x000104b18c0d pure @safe char[] core.demangle.Demangle!(core.demangle.NoHooks).Demangle.put(const(char)[]) + 129 7 ddemangle 0x000104b1d28a pure @safe void core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseValue(char[], char) + 1574 8 ddemangle 0x000104b1ded8 pure @safe void core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseTemplateArgs() + 652 9 ddemangle 0x000104b1e69e pure @safe void core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseTemplateInstanceName(bool) + 282 10 ddemangle 0x000104b1e9be pure @safe void core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseSymbolName() + 162 11 ddemangle 0x000104b1eca0 pure @safe char[] core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseQualifiedName() + 68 12 ddemangle 0x000104b1ad82 pure @safe char[] core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseType(char[]) + 3558 13 ddemangle 0x000104b1bdcf pure @safe char[] core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseType(char[]).__lambda4() + 19 14 ddemangle 0x000104b1bccb pure @safe char[] core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseType(char[]).parseBackrefType(scope char[] delegate() pure @safe) + 263 15 ddemangle 0x000104b1a036 pure @safe char[] core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseType(char[]) + 154 16 ddemangle 0x000104b1c8ac pure @safe void core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseFuncArguments() + 760 17 ddemangle 0x000104b1ebd2 pure @safe char[] core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseFunctionTypeNoReturn(bool) + 374 18 ddemangle 0x000104b1ecaa pure @safe char[] core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseQualifiedName() + 78 19 ddemangle 0x000104b1ad82 pure @safe char[] core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseType(char[]) + 3558 20 ddemangle 0x000104b1a1d2 pure @safe char[] core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseType(char[]) + 566 21 ddemangle 0x000104b1c8ac pure @safe void core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseFuncArguments() + 760 22 ddemangle 0x000104b1ebd2 pure @safe char[] core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseFunctionTypeNoReturn(bool) + 374 23 ddemangle 0x000104b1ee82 pure @safe void core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseMangledName(bool, ulong) + 374 24 ddemangle 0x000104b1f469 pure nothrow @safe char[] core.demangle.Demangle!(core.demangle.NoHooks).Demangle.doDe
[Issue 17832] std.random.choice cannot be used with other random generators
https://issues.dlang.org/show_bug.cgi?id=17832 Seb changed: What|Removed |Added Keywords||pull CC||greensunn...@gmail.com --- Comment #1 from Seb --- PR: https://github.com/dlang/phobos/pull/5741 --
[Issue 17941] arity (and probably others) only consider the first lexically present function
https://issues.dlang.org/show_bug.cgi?id=17941 Simen Kjaeraas changed: What|Removed |Added CC||dechcaudron+dlang.issue.tra ||ck...@protonmail.com --- Comment #2 from Simen Kjaeraas --- *** Issue 18314 has been marked as a duplicate of this issue. *** --
[Issue 18314] std.traits.getSymbolsByUDA only considers the first symbol of an overload set
https://issues.dlang.org/show_bug.cgi?id=18314 Simen Kjaeraas changed: What|Removed |Added Status|NEW |RESOLVED CC||simen.kja...@gmail.com Resolution|--- |DUPLICATE --- Comment #1 from Simen Kjaeraas --- *** This issue has been marked as a duplicate of issue 17941 *** --
[Issue 18319] std.exception: enforce example does not compile
https://issues.dlang.org/show_bug.cgi?id=18319 Seb changed: What|Removed |Added Keywords||pull CC||greensunn...@gmail.com --- Comment #1 from Seb --- PR https://github.com/dlang/phobos/pull/6080 --
[Issue 16739] switch ignores case
https://issues.dlang.org/show_bug.cgi?id=16739 --- Comment #6 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/efc7377ec02c19377366bf9eb80ed7b3653b457c add test for issue 16739 - switch ignores case https://github.com/dlang/druntime/commit/2411c52cbc31693e0a46fa06fb592787c9634ef0 Merge pull request #2064 from aG0aep6G/16739 add test for issue 16739 - switch ignores case merged-on-behalf-of: Andrei Alexandrescu --
[Issue 17941] arity (and probably others) only consider the first lexically present function
https://issues.dlang.org/show_bug.cgi?id=17941 --- Comment #3 from dechcaudron+dlang.issue.track...@protonmail.com --- > a real solution would allow people to indicate which overload they're > interested in Maybe allow something of the sort static assert(arity!fun(int) == 1); static assert(arity!gun(int, int) == 2); ? I had reported this as a Phobos issue (see above), but since it has been marked as a duplicate for a dmd one, there's not much I can do. Compiler stuff is still magic to me, I'm afraid. --
[Issue 12511] static overloaded function is not accessible
https://issues.dlang.org/show_bug.cgi?id=12511 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/0278c5138a2b9d6329b20d58e2164f13556bcda7 Fix Issue 12511 - static overloaded function is not accessible https://github.com/dlang/dmd/commit/1928320aef174f3a4eaecc375b8ed650049084d9 Added link to issue 12511 https://github.com/dlang/dmd/commit/1b0890a76b5bc6d3c994be31ed6b8c410916b4ca Merge pull request #7773 from RazvanN7/Issue_12511 Fix Issue 12511 - static overloaded function is not accessible merged-on-behalf-of: Mike Franklin --
[Issue 12511] static overloaded function is not accessible
https://issues.dlang.org/show_bug.cgi?id=12511 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 17036] Template default parameter does not works correctly
https://issues.dlang.org/show_bug.cgi?id=17036 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --- Comment #4 from hst...@quickfur.ath.cx --- Related: https://issues.dlang.org/show_bug.cgi?id=16467 https://issues.dlang.org/show_bug.cgi?id=17186 --
[Issue 17186] Type inference for parameters with default argument
https://issues.dlang.org/show_bug.cgi?id=17186 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --- Comment #5 from hst...@quickfur.ath.cx --- Related: https://issues.dlang.org/show_bug.cgi?id=17036 https://issues.dlang.org/show_bug.cgi?id=16467 --
[Issue 18321] undefined reference to __ModuleInfoZ depending on whether module is imported directly or indirectly
https://issues.dlang.org/show_bug.cgi?id=18321 Timothee Cour changed: What|Removed |Added CC||timothee.co...@gmail.com Severity|enhancement |normal --
[Issue 18321] New: undefined reference to __ModuleInfoZ depending on whether module is imported directly or indirectly
https://issues.dlang.org/show_bug.cgi?id=18321 Issue ID: 18321 Summary: undefined reference to __ModuleInfoZ depending on whether module is imported directly or indirectly Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: timothee.co...@gmail.com dmd -oftest3 -version=B main.d #ok dmd -oftest3 -version=A main.d Undefined symbols for architecture x86_64: "_D4foo24util12__ModuleInfoZ", referenced from: _D4main12__ModuleInfoZ in test3.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ```d module main; version(A) import foo2.util; version(B) import foo2.util2; void main(){fun;} module foo2.util2; public import foo2.util; module foo2.util; void fun()(){ // these cause the link error import std.path; //import std.file; /+ // these are ok import std.stdio; import std.range; import std.algorithm; +/ } ``` --