[Issue 12528] [CTFE] cannot append elements from one inout array to another inout array
https://d.puremagic.com/issues/show_bug.cgi?id=12528 Kenji Hara changed: What|Removed |Added Keywords||pull, rejects-valid --- Comment #2 from Kenji Hara 2014-04-06 23:53:52 PDT --- https://github.com/D-Programming-Language/dmd/pull/3430 -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12532] __traits(compiles, ...) fails to see valid enum symbols
https://d.puremagic.com/issues/show_bug.cgi?id=12532 monarchdo...@gmail.com changed: What|Removed |Added CC||monarchdo...@gmail.com --- Comment #1 from monarchdo...@gmail.com 2014-04-06 23:09:32 PDT --- Reduced: // enum a = is(typeof(b)); enum b = is(typeof(a)); pragma(msg, a); //true pragma(msg, b); //false // I'm not sure this is actually resolvable...? -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12359] implicit overload merging with selective imports should be removed
https://d.puremagic.com/issues/show_bug.cgi?id=12359 Martin Nowak changed: What|Removed |Added CC||c...@dawg.eu --- Comment #11 from Martin Nowak 2014-04-06 22:28:26 PDT --- (In reply to comment #10) > I think this is much non-intuitive behavior. No one would expect the silent > code breaking in module b. I do agree with the diagnosis but we absolutely need a proper upgrade plan. I know it's tricky, but we need a warning for code that relies on the implicit alias without affecting code that just uses the imported symbol. First of all you want to reach a consensus on the topic though. I haven't yet seen any good argument in favor of the current behavior, still it's used quite deliberately in many places. > They are just funny ideas to mask fully qualified names. Fully qualified names hardly do any harm, except for rare cases where a package name collides with a rename. So maybe a syntax isn't necessary. import core = core.win; -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12359] implicit overload merging with selective imports should be removed
https://d.puremagic.com/issues/show_bug.cgi?id=12359 --- Comment #10 from Kenji Hara 2014-04-06 21:40:13 PDT --- The negative effect of the implicit alias is that it makes selective imports and basic imports unexchangeable. For example: module a; auto foo(int[] ) { return 2; } module b; import a; // [A] auto foo(long[] ) { return 1; } void main() { assert(foo([1,2]) == 1); } At the line [A], the basic import makes b.foo visible, but it is hidden by b.foo. Therefore foo([1,2]) in main will call b.foo properly. Next, what's will occur if you replace `import a;` to `import a : foo`? import a : foo; // [A2] auto foo(long[] ) { return 1; } The selected a.foo is *implicitly* added in the overload set of b.foo, then foo([1,2]) will match a.foo(int[] ) more better than b.foo(long[] ), and the assertion in main will fail in runtime. I think this is much non-intuitive behavior. No one would expect the silent code breaking in module b. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12359] implicit overload merging with selective imports should be removed
https://d.puremagic.com/issues/show_bug.cgi?id=12359 Kenji Hara changed: What|Removed |Added Summary|implicit overload merging |implicit overload merging |with selective/renamed |with selective imports |imports should be removed |should be removed --- Comment #9 from Kenji Hara 2014-04-06 21:22:13 PDT --- Very sorry, I was misused the word "renamed imports" for the feature "selective imports with renaming selected symbols". I tweak the issue summary. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12534] ICE on using expression tuple as type tuple
https://d.puremagic.com/issues/show_bug.cgi?id=12534 Kenji Hara changed: What|Removed |Added Keywords||pull --- Comment #1 from Kenji Hara 2014-04-06 21:02:31 PDT --- https://github.com/D-Programming-Language/dmd/pull/3429 -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12534] New: ICE on using expression tuple as type tuple
https://d.puremagic.com/issues/show_bug.cgi?id=12534 Summary: ICE on using expression tuple as type tuple Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: ice Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: k.hara...@gmail.com --- Comment #0 from Kenji Hara 2014-04-06 19:59:28 PDT --- Test case: alias TypeTuple(T...) = T; void main() { int x, y; alias exprs = TypeTuple!(x, y); static assert(is(exprs[0..0])); // ICE! } Output: assert hdrgen.c(770) 0 -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12174] Problems caused by enum predicate with std.algorithm.sum
https://d.puremagic.com/issues/show_bug.cgi?id=12174 Kenji Hara changed: What|Removed |Added Keywords||pull --- Comment #3 from Kenji Hara 2014-04-06 05:51:24 PDT --- (In reply to comment #1) > I have no idea what is going on, but on 2.065, I get: > > main.d(7): Error: no property 'sum' for type 'MapResult!(__lambda2, string)' > main.d(10): Error: no property 'sum' for type 'MapResult!(__lambda2, string)' > Assertion failure: '0' on line 357 in file 'interpret.c' > > abnormal program termination > > Also on windows x86. Not sure what happened: I don't really understand your > code, but why isn't it even compiling anymore? > > In any case, adding ice and reg. The ICE regression is caused from 2.064. https://github.com/D-Programming-Language/dmd/pull/3426 -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3889] Forbid null as representation of empty dynamic array
https://d.puremagic.com/issues/show_bug.cgi?id=3889 --- Comment #16 from bearophile_h...@eml.cc 2014-04-06 03:16:04 PDT --- This difference shows another reason to forbid the usage of "null" as array literal (found thanks to "anonymous":): void main() { import std.stdio: writeln; int[][] a; writeln(a.length); a ~= []; writeln(a.length); a ~= null; writeln(a.length); } Output: 0 0 1 -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12533] New: instantiated template using __traits(compiles, ...) causes semantic errors when reused
https://d.puremagic.com/issues/show_bug.cgi?id=12533 Summary: instantiated template using __traits(compiles, ...) causes semantic errors when reused Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: 2k...@gmx.net --- Comment #0 from det <2k...@gmx.net> 2014-04-06 16:39:50 PDT --- compilation fails for no reason in given example involving a template using mixin, static if and __traits(compiles, ...) code reflection. see details in example as it is too complicated to describe. might be related to issue 12532. however, example fails as well when 'enum' is replaced by 'const' === EXAMPLE === template valid(string mem){ pragma(msg, "instantiation of valid with: "~mem); static if( !__traits( compiles, mixin(mem) ) ){ enum valid = false; }else{ enum valid = true; } } enum works = valid!"fails"; pragma(msg, "found 'fails' (via 'works')? "~works.stringof ); // compiles but produces 'false': issue 12532 enum dummy = valid!"fails"; pragma(msg, "found 'fails' (via 'dummy')? "~dummy.stringof ); // compiles but produces 'false': issue 12532 enum fails = valid!"fails"; // Error: variable demo.fails had semantic errors when compiling // NOTE: if you comment out the first two usages of valid!"fails", // it will work here - but give 'false' again. // pragma(msg, "found 'fails' (via 'fails')? "~fails.stringof ); void main(){} -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12532] New: __traits(compiles, ...) fails to see valid enum symbols
https://d.puremagic.com/issues/show_bug.cgi?id=12532 Summary: __traits(compiles, ...) fails to see valid enum symbols Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: 2k...@gmx.net --- Comment #0 from det <2k...@gmx.net> 2014-04-06 16:23:40 PDT --- under certain circumstances, eg when called from a template using mixin and static if, __traits(compiles, ...) fails to see valid enum symbols. (if 'enum' in following example is replaced by 'const bool' or 'immutable bool' all symbols are found.) === EXAMPLE === template valid(string mem){ pragma(msg, "instantiation of 'valid' with: "~mem); static if( !__traits( compiles, mixin(mem) ) ){ enum valid = false; }else{ enum valid = true; } } enum ok = valid!"works"; pragma(msg, "found 'works'? "~ok.stringof ); // true - fine, recognizes 'works' later in module scope enum foo = valid!"bar"; pragma(msg, "found 'bar'? "~foo.stringof ); // true - fine, recognizes 'bar' laterin module scope enum bar = valid!"foo"; pragma(msg, "found 'foo'? "~bar.stringof ); // false - fails to see 'foo' earlier in module scope! enum works = true; void main(){} -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12531] New: forward reference with nested struct
https://d.puremagic.com/issues/show_bug.cgi?id=12531 Summary: forward reference with nested struct Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: c...@dawg.eu --- Comment #0 from Martin Nowak 2014-04-06 14:42:07 PDT --- cat > bug.d << CODE struct Node(T) { T _val; } void foo() { static struct Foo { Node!(Foo)* node; } } CODE dmd -c bug.d a.d(1): Error: struct a.Node!(Foo).Node has forward references Declaring struct Foo outside of a function resolves the problem. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12434] std.algorithm.sum of immutable array too
https://d.puremagic.com/issues/show_bug.cgi?id=12434 --- Comment #2 from monarchdo...@gmail.com 2014-04-06 13:17:38 PDT --- (In reply to comment #1) > I'll look into this. Thanks. Trivial. https://github.com/D-Programming-Language/phobos/pull/2071 -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12530] uniform initialization for type tuples too
https://d.puremagic.com/issues/show_bug.cgi?id=12530 --- Comment #2 from monarchdo...@gmail.com 2014-04-06 13:02:13 PDT --- (In reply to comment #1) > Please show one or more use cases. I've had need of this, for example, to transform the types of variadic arguments, before passing them to another function. "reduce" or "uninitializedArray" come to mind: // void main() { uninitialized!(int[][])(1, 2); } alias ToSizeT(T) = size_t; enum IsSizeT(T) = is(S == size_t); auto uninitialized(T, Args...)(Args args) { //transform the "int" inference to "size_t" alias SizeTArgs = staticMap!(ToSizeT, Args); //Call with the same arguments, but cast to size_t... //if the cast is implicitly safe return impl!T(SizeTArgs(args)); } auto impl(T, Args...)(Args args) //Avoid bloat by requesting size_t args. { static assert(allSatisfy!(IsSizeT, Args)); } // The same design can be used to transform/forward args, say to unqualify all of them at once: // void myFun(Args(Args args)) { alias UArgs = staticMap!(Unqual, Args); static if (!is(UArgs == ARgs)) myFun(UArgs(args)); else { //actual implementation here } } Or, in the case of reduce, to build the different seeds from front: auto result = tuple(SeedTypes(r.front)); -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12530] uniform initialization for type tuples too
https://d.puremagic.com/issues/show_bug.cgi?id=12530 bearophile_h...@eml.cc changed: What|Removed |Added CC||bearophile_h...@eml.cc --- Comment #1 from bearophile_h...@eml.cc 2014-04-06 12:32:55 PDT --- (In reply to comment #0) > I think these should work: > > auto a = TypeTuple!(int, int, int)(); //(0, 0, 0) > auto b = TypeTuple!(int, int, int)(1); //(1, 1, 1) > //auto c = TypeTuple!(int, int, int)(1, 2); //Should fail > auto d = TypeTuple!(int, int, int)(1, 2, 3); //(1, 2, 3) Please show one or more use cases. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12530] New: uniform initialization for type tuples too
https://d.puremagic.com/issues/show_bug.cgi?id=12530 Summary: uniform initialization for type tuples too Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: monarchdo...@gmail.com --- Comment #0 from monarchdo...@gmail.com 2014-04-06 12:14:28 PDT --- Not sure if enhancement request or bug, but filing as EH. I think these should work: // auto a = TypeTuple!(int, int, int)(); //(0, 0, 0) auto b = TypeTuple!(int, int, int)(1); //(1, 1, 1) //auto c = TypeTuple!(int, int, int)(1, 2); //Should fail auto d = TypeTuple!(int, int, int)(1, 2, 3); //(1, 2, 3) // Currently they all produce: Error: function expected before (), not (int, int, int) of type (int, int, int) In particular, I think this should work: // TypeTuple!(int, int, int) a = ...; TypeTuple!(int, int, int) b = TypeTuple!(int, int, int)(a); // Though arguably, it's the exactly the same as the "d" case above. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12527] Cannot make @system function/delegate alias in a @safe section
https://d.puremagic.com/issues/show_bug.cgi?id=12527 --- Comment #1 from Lars T. Kyllingstad 2014-04-06 11:55:52 PDT --- Actually, I think the test case should compile even without the explicit @system attribute. I've filed a separate report about this, see issue 12529. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12529] New: Function/delegate type alias picks up @safe attribute from surrounding scope
https://d.puremagic.com/issues/show_bug.cgi?id=12529 Summary: Function/delegate type alias picks up @safe attribute from surrounding scope Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bugzi...@kyllingen.net --- Comment #0 from Lars T. Kyllingstad 2014-04-06 11:48:27 PDT --- Consider: @safe: alias F = void function(); This wrongly makes F an alias of "void function() @safe" rather than "void function()". Here is a test case which should compile, but which fails to do so: void foo() { } @safe: alias F = void function(); @trusted void bar(F f) { f(); } void main() { bar(&foo); } DMD says: bug.d(6): Error: function bug.bar (void function() @safe f) is not callable using argument types (void function()) -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12312] Regression (2.064): Diagnostic for void static arrays has gone bad
https://d.puremagic.com/issues/show_bug.cgi?id=12312 Kenji Hara changed: What|Removed |Added Keywords||diagnostic, pull Version|unspecified |D2 --- Comment #2 from Kenji Hara 2014-04-06 09:54:04 PDT --- https://github.com/D-Programming-Language/dmd/pull/3428 -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12528] [CTFE] cannot append elements from one inout array to another inout array
https://d.puremagic.com/issues/show_bug.cgi?id=12528 --- Comment #1 from Martin Nowak 2014-04-06 09:25:29 PDT --- workaround: foreach (ref e; a) res ~= [e]; -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12528] New: foreach with inout ref argument cannot be interpreted at compile time
https://d.puremagic.com/issues/show_bug.cgi?id=12528 Summary: foreach with inout ref argument cannot be interpreted at compile time Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: CTFE Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: c...@dawg.eu --- Comment #0 from Martin Nowak 2014-04-06 08:33:39 PDT --- cat > bug.d << CODE inout(T)[] dup(T)(inout(T)[] a) { inout(T)[] res; foreach (ref e; a) res ~= e; return res; } enum works = dup([0]); enum trigger = dup([0, 1]); CODE dmd -c bug.d bug.d(5): Error: Cannot interpret res ~= e at compile time bug.d(10):called from here: dup([0, 1]) Probably some issue when reassigning the foreach argument because it's only triggered when the array has more than one element. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12179] [ICE](e2ir.c 1861) with array operation
https://d.puremagic.com/issues/show_bug.cgi?id=12179 Kenji Hara changed: What|Removed |Added Keywords||diagnostic, ice, pull --- Comment #3 from Kenji Hara 2014-04-06 08:12:41 PDT --- https://github.com/D-Programming-Language/dmd/pull/3427 -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12526] DDox possible issue with case sensitive file names
https://d.puremagic.com/issues/show_bug.cgi?id=12526 --- Comment #2 from Martin Nowak 2014-04-06 08:03:48 PDT --- Aggregation seems feasible because the two entities have a close relation, i.e. usually the lower case is a constructor using IFTI. http://dlang.org/library/std/range/outputRangeObject.html http://dlang.org/library/std/range/OutputRangeObject.html -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12526] DDox possible issue with case sensitive file names
https://d.puremagic.com/issues/show_bug.cgi?id=12526 S�nke Ludwig changed: What|Removed |Added CC||slud...@outerproduct.org --- Comment #1 from S�nke Ludwig 2014-04-06 07:35:44 PDT --- Exactly, Andrei generates the website on an OS X box, which uses case insensitive HFS by default. AFAICS there is no way to talk the OS to still store files case sensitive (like there is on Windows) other than using a partition with a case sensitive FS, so there are only two options: find some alternative file name scheme that doesn't rely on case, or switch to a case sensitive file system when generating the documentation. Andrei's suggestion was to just aggregate everything under the all lower case version of the name. This would be an option, but requires some reorganization of how DDOX outputs the pages, breaks old links (probably still acceptable at this point?) and slightly waters the one entity == one page concept (which is of course already not working for function overloads). All the other schemes that came to mind (such as numbering pages with names of different case, or escaping upper case letters) are either ugly or would result in transient links. My favorite would obviously be to just switch the file system, but of course Andrei has the last call there - and it also wouldn't be the worst thing to have something that works on any OS/FS. Any other ideas how to solve this? If not, I'll look into the aggregation solution as soon as I get some time for that. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12527] New: Cannot make @system function/delegate alias in a @safe section
https://d.puremagic.com/issues/show_bug.cgi?id=12527 Summary: Cannot make @system function/delegate alias in a @safe section Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bugzi...@kyllingen.net --- Comment #0 from Lars T. Kyllingstad 2014-04-06 07:25:09 PDT --- Consider the following: @safe: alias Fun = void function() @system; pragma (msg, Fun.stringof); alias Del = void delegate() @system; pragma (msg, Del.stringof); When compiling this, DMD prints: void function() @safe void delegate() @safe In other words, the @safe: directive somehow prevents the @system attribute from becoming part of the alias. Here is a test case which should compile, but which doesn't: @safe: alias Fun = void function() @system; @system void foo() { } @trusted void bar(Fun fun) { fun(); } void main() { bar(&foo); } This fails with the following error message: bug.d(5): Error: function bug.bar (void function() @safe fun) is not callable using argument types (void function() @system) -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 12526] New: DDox possible issue with case sensitive file names
https://d.puremagic.com/issues/show_bug.cgi?id=12526 Summary: DDox possible issue with case sensitive file names Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: websites AssignedTo: nob...@puremagic.com ReportedBy: c...@dawg.eu --- Comment #0 from Martin Nowak 2014-04-06 07:17:12 PDT --- Not sure where this comes from (case insensitive file system?) but the documentation for TaskPool is missing. It's page is overwritten by the documentation for taskPool and the taskPool.html page doesn't exist. http://dlang.org/library/std/parallelism/taskPool.html http://dlang.org/library/std/parallelism/TaskPool.html -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---