[Issue 8081] pure nothrow unittest problem in generated 'header' file
http://d.puremagic.com/issues/show_bug.cgi?id=8081 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull Platform|x86 |All --- Comment #2 from Kenji Hara k.hara...@gmail.com 2012-09-22 23:28:11 PDT --- https://github.com/D-Programming-Language/dmd/pull/1139 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8475] postblits fails attributes qualifying when in a template.
http://d.puremagic.com/issues/show_bug.cgi?id=8475 --- Comment #2 from github-bugzi...@puremagic.com 2012-09-22 23:39:46 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/3e171f435d2761489818c83b0bda305a158a353a fix Issue 8475 - postblits fails attributes qualifying when in a template. In PostBlitDeclaration::syntaxCopy, storage_class should also be copied to new AST object. It's a design failure of the signature in PostBlitDeclaration constructor, so merge two constructors into one. https://github.com/D-Programming-Language/dmd/commit/3f8a3b6bf85fda3e93e032fe07a33967cf76768f Merge pull request #1137 from 9rnsr/fix8475 Issue 8475 - postblits fails attributes qualifying when in a template. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8150] Throwing nothrow struct constructor?
http://d.puremagic.com/issues/show_bug.cgi?id=8150 --- Comment #2 from github-bugzi...@puremagic.com 2012-09-22 23:43:35 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/cd1252036b41533ba5b132c99471e84d468d1f0b Making Throwable and derived classes constructors @safe/pure/nothrow. This is supplemental change for fixing issue 8150. Constructing throwable object can be @sage, pure, and nothrow. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8475] postblits fails attributes qualifying when in a template.
http://d.puremagic.com/issues/show_bug.cgi?id=8475 Brad Roberts bra...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bra...@puremagic.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8309] ICE in typeMerge on 'void main(){auto x = [()=1.0, ()=1]; }'
http://d.puremagic.com/issues/show_bug.cgi?id=8309 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #3 from Kenji Hara k.hara...@gmail.com 2012-09-23 02:02:50 PDT --- https://github.com/D-Programming-Language/dmd/pull/1140 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8709] New: toLower on alias this
http://d.puremagic.com/issues/show_bug.cgi?id=8709 Summary: toLower on alias this Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: luka8...@owave.net --- Comment #0 from luka8088 luka8...@owave.net 2012-09-23 02:58:17 PDT --- // it used to work in DMD2 0.57 module program; import std.stdio; import std.string; struct myStruct { alias value this; string value; } void main () { myStruct s1; s1.value = Test; writeln(s1); // outputs Test writeln(s1.toLower()); // phobos/std/string.d(871): Error: e2ir: cannot cast result of type char[] to type myStruct } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8709] toLower on alias this
http://d.puremagic.com/issues/show_bug.cgi?id=8709 Jonathan M Davis jmdavisp...@gmx.com changed: What|Removed |Added CC||jmdavisp...@gmx.com Component|Phobos |DMD --- Comment #1 from Jonathan M Davis jmdavisp...@gmx.com 2012-09-23 03:40:50 PDT --- Reduced test case: struct S { alias value this; string value; } void main () { auto s = S(hello); char[] arr = world.dup; s = cast(S)other; s = cast(S)arr; } The cast from string to S works, but the cast from char[] to S does not, in spite of the fact that their only difference is constness. However, the fact that this came up with std.string.toLower just highlights how error-prone it is to use alias this with templated functions. It's insanely easy to have template constraints which pass just fine due to the presense of alias this but then fail to actually compile or which behave bizarrely due to when conversions do and don't happen. I don't know what the solution to that is though. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8710] New: std.typecons.Tuple and double declared nested struct crashes dmd
http://d.puremagic.com/issues/show_bug.cgi?id=8710 Summary: std.typecons.Tuple and double declared nested struct crashes dmd 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 k.hara...@gmail.com 2012-09-23 05:37:41 PDT --- Test case: import std.typecons; void main() { { struct S {} } { struct S { bool opEquals(T)(T a) { return false; } } auto t1 = tuple(S.init); // crash dmd } } Reduced test case doesn't crash dmd, but cause an ICE. struct Tuple(T...) { T field; } void main() { { struct S {} } { struct S { bool opEquals(T)(T a) { return false; } } auto t2 = Tuple!(S)(S.init); // ICE // assert struct.c(227) alignment 0 !(alignment (alignment - 1)) } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8711] New: Missing line number and bad error messages with a wrong functions array initialization
http://d.puremagic.com/issues/show_bug.cgi?id=8711 Summary: Missing line number and bad error messages with a wrong functions array initialization Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: diagnostic Severity: major Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-09-23 08:03:31 PDT --- This is correct code: int function(int)[] foos = [x = 0]; void main() {} This wrong program is the same, but it lacks the []: int function(int) foos = [x = 0]; void main() {} DMD 2.061alpha gives on the second program: temp.d(1): Error: cannot implicitly convert expression (__lambda2) of type int function(int x) pure nothrow @safe to int(int) Error: no size for type int(int) Some problems: - The first line doesn't seem to mention that foos is not typed as an array. - The second error message lacks a line number: - I am not sure that no size for ... is correct. (This bug has severity 'major' as Don asked me for error messages missing line numbers.) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8712] New: There is no staticFilter in std.typetuple
http://d.puremagic.com/issues/show_bug.cgi?id=8712 Summary: There is no staticFilter in std.typetuple Product: D Version: future Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: void.unsig...@gmail.com --- Comment #0 from void.unsig...@gmail.com 2012-09-23 10:26:09 PDT --- The standard module for type list manipulation there are metafunctions such as staticMap and ReplaceAll and EraseAll, but there is no staticFilter. staticFilter is good, because filter, like map is foundamental operation of functional-programming like lists. Also, it is more general-purpose: EraseAll can be implemented in terms of staticFilter. As a use-case, we may use the function as follows: alias staticFilter!(isInputRange, R1, R2, R3) InputRanges; -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8712] There is no staticFilter in std.typetuple
http://d.puremagic.com/issues/show_bug.cgi?id=8712 bearophile_h...@eml.cc changed: What|Removed |Added CC||bearophile_h...@eml.cc --- Comment #1 from bearophile_h...@eml.cc 2012-09-23 11:38:31 PDT --- If you are willing to write the implementation, with ddocs and unittests, and set it as Phobos pull request, I think they will add it to Phobos. Especially if here you are able to list some other use cases coming from your code or from Phobos source code. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8713] New: Allow passing arguments to templates in CTFE
http://d.puremagic.com/issues/show_bug.cgi?id=8713 Summary: Allow passing arguments to templates in CTFE Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: jens.k.muel...@gmx.de --- Comment #0 from jens.k.muel...@gmx.de 2012-09-23 13:47:19 PDT --- When doing CTFE it may be worthwhile to allow passing of function arguments to template instantiations. This eases better integration between templates and CTFE making meta programming more convenient. Example: bool foo(string a) { return bar!(a); } template bar(string b) { enum bar = true; } fails to compile with test.d(3): Error: variable a cannot be read at compile time The problem is that foo must be compilable to be executed at run-time which clearly cannot work with the above code. But if __ctfe was a compile-time known value foo could be written like: static if (__ctfe) { return bar!(a) } else { return false; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8714] New: Instantiate template within CTFE with same CTFE returned value
http://d.puremagic.com/issues/show_bug.cgi?id=8714 Summary: Instantiate template within CTFE with same CTFE returned value Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: jens.k.muel...@gmx.de --- Comment #0 from jens.k.muel...@gmx.de 2012-09-23 14:08:29 PDT --- To better integrate CTFE and templates it may be worthwhile to allow code as follows string foo(string f) { if (f == somestring) { return got somestring; } return bar!(foo(somestring)); } template bar(string s) { enum bar = s; } Note, that the return value of foo(somestring) is got somestring which should be possible to pass to some template. Code like string foo(string f) { if (f == somestring) { return got somestring; } return bar!(foo(somestring))(); } string bar(string s)() { return s; } should compile as well. Both fail with dmd 2.060. The first code fails with: test.d(7):called from here: foo(somestring) test.d(7):called from here: foo(somestring) test.d(7):called from here: foo(somestring) test.d(7): Error: expression foo(somestring) is not a valid template value argument test.d(12):called from here: foo(somestring) test.d(12):called from here: foo(somestring) test.d(7): Error: template instance test.bar!(foo(somestring)) error instantiating and the second with: test.d(7):called from here: foo(somestring) test.d(7):called from here: foo(somestring) test.d(7):called from here: foo(somestring) test.d(7): Error: expression foo(somestring) is not a valid template value argument test.d(7): Error: template instance test.bar!(foo(somestring)) error instantiating If code like above should stay invalid the compiler diagnostics should be improved. I.e. recursive dependency on foo when analyzing foo in CTFE. See also the discussion on the list http://forum.dlang.org/thread/mailman.148.1348176167.5162.digitalmar...@puremagic.com http://forum.dlang.org/thread/20120920212236.gd3...@minet.uni-jena.de -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8712] There is no staticFilter in std.typetuple
http://d.puremagic.com/issues/show_bug.cgi?id=8712 Jonathan M Davis jmdavisp...@gmx.com changed: What|Removed |Added Status|NEW |RESOLVED CC||jmdavisp...@gmx.com Resolution||FIXED --- Comment #2 from Jonathan M Davis jmdavisp...@gmx.com 2012-09-23 14:49:09 PDT --- It's not in 2.060, but we have std.typetuple.Filter in the latest git which does this already. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8608] ICE(interpret.c): CTFE using runtime variable as ref parameter
http://d.puremagic.com/issues/show_bug.cgi?id=8608 --- Comment #7 from github-bugzi...@puremagic.com 2012-09-23 15:41:48 PDT --- Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/016aacaf6b97644102e476106092673913431d68 merge D2 pull #1130 fix Issue 8608 - ICE(interpret.c): CTFE using runtime variable as ref parameter -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8715] New: zipWith
http://d.puremagic.com/issues/show_bug.cgi?id=8715 Summary: zipWith Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-09-23 15:52:06 PDT --- I suggest to add the higher order function zipWith to Phobos, similar to the Haskell function present in the Prelude: Prelude zipWith (+) [1,2,3] [10,20,30] [11,22,33] Prelude data Vec = Vec Int Int deriving (Show) Prelude zipWith Vec [1,2,3] [10,20,30] [Vec 1 10,Vec 2 20,Vec 3 30] As you see it's handy in two use cases: the first case is a zip that applies a given function to the pairs. The other important use case is when you don't need zip() to build an iterable of generic tuples, but you want it to build a range of a specific given struct/tuple. The Haskell code in D using the current Phobos: import std.algorithm, std.range; void main() { auto r1 = zip([1,2,3], [10,20,30]).map!(p = p[0] + p[1])(); static struct Vec { int x, y; } auto r2 = zip([1,2,3], [10,20,30]).map!(p = Vec(p.tupleof))(); } With a zipWith() the code becomes simpler and more readable: import std.range; void main() { auto r1 = zipWith!q{a + b}([1,2,3], [10,20,30]); static struct Vec { int x, y; } auto r2 = zipWith!Vec([1,2,3], [10,20,30]); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8715] zipWith
http://d.puremagic.com/issues/show_bug.cgi?id=8715 timon.g...@gmx.ch changed: What|Removed |Added CC||timon.g...@gmx.ch --- Comment #1 from timon.g...@gmx.ch 2012-09-23 16:34:39 PDT --- I suggest to add anything that is not yet there and applicable to ranges listed here up to and excluding 'special lists': http://www.haskell.org/ghc/docs/latest/html/libraries/base/Data-List.html -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8715] zipWith
http://d.puremagic.com/issues/show_bug.cgi?id=8715 --- Comment #2 from bearophile_h...@eml.cc 2012-09-23 17:48:57 PDT --- A simpler alternative idea is to just extend zip() to optionally accept a function/constructor (it's also good for map() to accept a struct name): import std.range; void main() { auto r1 = zip!q{a + b}([1,2,3], [10,20,30]); static struct Vec { int x, y; } auto r2 = zip!Vec([1,2,3], [10,20,30]); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8715] zipWith
http://d.puremagic.com/issues/show_bug.cgi?id=8715 --- Comment #3 from timon.g...@gmx.ch 2012-09-23 18:04:46 PDT --- (In reply to comment #2) A simpler alternative idea is to just extend zip() to optionally accept a function/constructor (it's also good for map() to accept a struct name): import std.range; void main() { auto r1 = zip!q{a + b}([1,2,3], [10,20,30]); static struct Vec { int x, y; } auto r2 = zip!Vec([1,2,3], [10,20,30]); } I prefer this. 'zip' would become 'zipWith' with a default template argument of 'tuple'. (map already accepts a struct with an appropriate constructor as that fits the 'callable' definition.) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8608] ICE(interpret.c): CTFE using runtime variable as ref parameter
http://d.puremagic.com/issues/show_bug.cgi?id=8608 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8510] No line number in error message for conflicting aliases
http://d.puremagic.com/issues/show_bug.cgi?id=8510 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #4 from Kenji Hara k.hara...@gmail.com 2012-09-23 18:52:26 PDT --- Fixed in D1 branch: https://github.com/D-Programming-Language/dmd/commit/7eeec8e7bc481de5ac03e928e23144e46d599559 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8484] [CTFE] Assertion failure: 'thisval thisval-op == TOKclassreference' on line 4896 in file 'interpret.c'.
http://d.puremagic.com/issues/show_bug.cgi?id=8484 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED --- Comment #4 from Kenji Hara k.hara...@gmail.com 2012-09-23 18:52:43 PDT --- Fixed in D1 branch: https://github.com/D-Programming-Language/dmd/commit/8ca66b12438f52141eab7d70c14a92675b1c30c3 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8559] void and function type prints redundant error message with init property
http://d.puremagic.com/issues/show_bug.cgi?id=8559 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Version|D2 |D1 D2 Resolution||FIXED --- Comment #3 from Kenji Hara k.hara...@gmail.com 2012-09-23 18:52:22 PDT --- Fixed in D1 branch: https://github.com/D-Programming-Language/dmd/commit/c819954c07c92c90caab5d833dc0881eb7f2a1eb -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8673] enum z = [0][(()=$-1)()]; crashes the compiler
http://d.puremagic.com/issues/show_bug.cgi?id=8673 --- Comment #1 from github-bugzi...@puremagic.com 2012-09-23 20:57:14 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ddcde35249c6c780422e11aa4ac965523f58aaea Fix issue 8673 enum z = [0][(()=$-1)()]; crashes the compiler variables with CTFE storage class shouldn't be treated as globals. (__dollar is a funny hack, it's neither global nor local). https://github.com/D-Programming-Language/dmd/commit/8f47d6113c8538131397ea2f68547ba2d859efb2 Merge pull request #1127 from donc/ice8673ctfe_dollar Fix issue 8673 enum z = [0][(()=$-1)()]; crashes the compiler -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8673] enum z = [0][(()=$-1)()]; crashes the compiler
http://d.puremagic.com/issues/show_bug.cgi?id=8673 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8716] New: `package` restricts members usage in same module if there is no package name
http://d.puremagic.com/issues/show_bug.cgi?id=8716 Summary: `package` restricts members usage in same module if there is no package name 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: verylonglogin@gmail.com --- Comment #0 from Denis Shelomovskij verylonglogin@gmail.com 2012-09-24 09:17:45 MSD --- All asserts passes for e.g. `a.b` module name (except `C.init.sf()` which isn't evaluatable at CT now). --- module ab; package int gf() { return 0; } static assert(gf() == 0); // function ab.gf is not accessible from module ab class C // struct, class, or union { package: enum e = 0; immutable static int si = 0; static int sf() { return 0; } immutable int i = 0; int f() const { return 0; } } static assert(C.e == 0); static assert(C.si == 0); static assert(C.sf() == 0); // function ab.C.sf is not accessible from module ab static assert(C.i == 0); static assert(C.init.e == 0); static assert(C.init.si == 0); // undefined identifier 'si' static assert(C.init.sf() == 0); // struct main.T!().C member sf is not accessible static assert(C.init.i == 0); --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3252] undefined reference to package function called from an interface
http://d.puremagic.com/issues/show_bug.cgi?id=3252 Denis Shelomovskij verylonglogin@gmail.com changed: What|Removed |Added CC||verylonglogin@gmail.com --- Comment #4 from Denis Shelomovskij verylonglogin@gmail.com 2012-09-24 09:21:31 MSD --- And this isn't related to Issue 8716 because `a.packageFunc` module gives the same error. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---