[Issue 6934] [CTFE] std.range.transversal at compile-time too
http://d.puremagic.com/issues/show_bug.cgi?id=6934 Don clugd...@yahoo.com.au changed: What|Removed |Added CC||clugd...@yahoo.com.au --- Comment #1 from Don clugd...@yahoo.com.au 2011-11-19 00:03:47 PST --- Reduced test case: -- struct Struct6934 { int[] x = [1,2]; } void bar6934(ref int[] p) { p = p[1..$]; } int bug6934() { Struct6934 q; bar6934(q.x); return 1; } static assert(bug6934()); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6296] ICE(glue.c): invalid template instantiated in is(typeof()).
http://d.puremagic.com/issues/show_bug.cgi?id=6296 Denis verylonglogin@gmail.com changed: What|Removed |Added Attachment #1006|0 |1 is obsolete|| --- Comment #19 from Denis verylonglogin@gmail.com 2011-11-19 15:49:07 MSK --- Created an attachment (id=1045) Bug testcase -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2883] [UFCS] array member call syntax fails when array is returned from property syntax
http://d.puremagic.com/issues/show_bug.cgi?id=2883 --- Comment #3 from Kenji Hara k.hara...@gmail.com 2011-11-19 05:12:32 PST --- In 2.057head, following code works, by fixing bug 6927. string getArray() { return hello; } void useArray(string str) { /* stuff */ } void main() { int i; i = getArray().length; // OK i = getArray.length; // OK getArray().useArray(); // OK getArray.useArray(); // 2.057head OK } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6941] .stringof displays redundant storage classes
http://d.puremagic.com/issues/show_bug.cgi?id=6941 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||patch --- Comment #1 from Kenji Hara k.hara...@gmail.com 2011-11-19 05:34:54 PST --- https://github.com/D-Programming-Language/dmd/pull/515 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6973] New: static assert(isOutputRange!(OutputRange!int, int)) is false
http://d.puremagic.com/issues/show_bug.cgi?id=6973 Summary: static assert(isOutputRange!(OutputRange!int, int)) is false Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: zan77...@nifty.com --- Comment #0 from SHOO zan77...@nifty.com 2011-11-19 10:24:48 PST --- This code doesn't work! import std.range; static assert(isOutputRange!(OutputRange!int, int)); This issue triggered from hasMember template. hasMember returns false if use interface or union. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6941] .stringof displays redundant storage classes
http://d.puremagic.com/issues/show_bug.cgi?id=6941 bearophile_h...@eml.cc changed: What|Removed |Added CC||bearophile_h...@eml.cc --- Comment #2 from bearophile_h...@eml.cc 2011-11-19 11:15:31 PST --- Related to bug 6755 ? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6974] New: Associative array with enum array keys is slow
http://d.puremagic.com/issues/show_bug.cgi?id=6974 Summary: Associative array with enum array keys is slow Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: enhancement Priority: P2 Component: druntime AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2011-11-19 11:27:14 PST --- In this benchmark program an associative array of immutable(char)[] keys is almost twice faster than an one with immutable(E)[] keys, where E is a char enum. I think there is some space for performance improvements. import core.stdc.stdio: printf; import std.string: split; immutable string[] corpus = the of to and a in is it you that he was for on are with as I his they be at one have this from or had by hot but some what there we can out other were all your when up use word how said an each she which do their time if will way about many then them would write like so these her long make thing see him two has look more day could go come did my sound no most number who over know water than call first people may down side been now find any new work part take get place made live where after back little only round man year came show every good me give our under name very through just form much great think say help low line before turn cause same mean differ move right boy old too does tell sentence set three want air well also play small end put home read hand port large spell add even land here must big high such follow act why ask men change went light kind off need house picture try us again animal point mother world near build self earth father head stand own page should country found answer school grow study still learn plant cover food sun four thought let keep eye never last door between city tree cross since hard start might story saw far sea draw left late run don't while press close night real life few stop open seem together next white children begin got walk example ease paper often always music those both mark book letter until mile river car feet care second group carry took rain eat room friend began idea fish mountain north once base hear horse cut sure watch color face wood main enough plain girl usual young ready above ever red list though feel talk bird soon body dog family direct pose leave song measure state product black short numeral class wind question happen complete ship area half rock order fire south problem piece told knew pass farm top whole king size heard best hour better true during hundred am remember step early hold west ground interest reach fast five sing listen six table travel less morning ten simple several vowel toward war lay against pattern slow center love person money serve appear road map science rule govern pull cold notice voice fall power town fine certain fly unit lead cry dark machine note wait plan figure star box noun field rest correct able pound done beauty drive stood contain front teach week final gave green oh quick develop sleep warm free minute strong special mind behind clear tail produce fact street inch lot nothing course stay wheel full force blue object decide surface deep moon island foot yet busy test record boat common gold possible plane age dry wonder laugh thousand ago ran check game shape yes hot miss brought heat snow bed bring sit perhaps fill east weight language among.split(); enum E : char { a='a', b='b', c='c', d='d', e='e', f='f', g='g', h='h', i='i', j='j', k='k', l='l', m='m', n='n', o='o', p='p', q='q', r='r', s='s', t='t', u='u', v='v', w='w', x='x', y='y', z='z' } alias immutable(char)[] MyString; // runtime 4.41 seconds //alias immutable(E)[] MyString; // runtime 7.92 seconds int main() { uint[MyString] aa; foreach (s; corpus) aa[cast(MyString)s] = 0; aa.rehash; // optional foreach (i; 0 .. 100_000) foreach (k; corpus) if (!(cast(MyString)k in aa)) { printf(error); return 1; } return 0; } The discussion thread: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.Darticle_id=149477 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6941] .stringof displays redundant storage classes
http://d.puremagic.com/issues/show_bug.cgi?id=6941 --- Comment #3 from Kenji Hara k.hara...@gmail.com 2011-11-19 11:35:44 PST --- (In reply to comment #2) Related to bug 6755 ? No, it isn't. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6975] New: Class documentation page rendered incorrectly
http://d.puremagic.com/issues/show_bug.cgi?id=6975 Summary: Class documentation page rendered incorrectly Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: major Priority: P2 Component: websites AssignedTo: nob...@puremagic.com ReportedBy: kyfo...@gmail.com --- Comment #0 from Kyle Foley kyfo...@gmail.com 2011-11-19 15:01:29 EST --- There is a major problem in the rendering of the class.html page. I've tried both d-p-l.org and the local class.html. See for yourself: http://www.d-programming-language.org/class.html -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6965] [CTFE] wrong reset of variable
http://d.puremagic.com/issues/show_bug.cgi?id=6965 --- Comment #2 from d...@dawgfoto.de 2011-11-19 12:07:40 PST --- Oops. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6934] [CTFE] can't use $ in a slice of an array passed by ref
http://d.puremagic.com/issues/show_bug.cgi?id=6934 --- Comment #2 from Don clugd...@yahoo.com.au 2011-11-19 12:24:51 PST --- In fact passing arrays by reference is broken in non-trivial cases. Changing the test case to include an index or slice assignment reveals wrong-code problems: void bar6934(ref int[] p) { p[0] = 12; assert(p[0] == 12); // fails!!! p[0..1] = 17; assert(p[0] == 17); // fails!!! p = p[1..$]; } This applies to any complicated passing of an array by ref (any dotvar or index expression, or combination thereof). It applies to array index assignment, and slice assignment. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3971] Syntax semantics for array assigns
http://d.puremagic.com/issues/show_bug.cgi?id=3971 timon.g...@gmx.ch changed: What|Removed |Added CC||timon.g...@gmx.ch --- Comment #20 from timon.g...@gmx.ch 2011-11-19 12:32:29 PST --- Also from that thread: First thing: int[3] a=3; // kill it!! Rest: a[] is _just a shortcut_ for a[0..$]! Are you really suggesting to disallow slicing? You are thinking too much in terms of syntax and not enough in terms of semantics. They are basically two distinct things involved here: 1. static arrays and lvalue slices 2. dynamic arrays and rvalue slices 1 implies value semantics, 2 implies reference semantics, where value semantics overrides reference semantics. Any other distinction is more or less arbitrary. As you pointed out, the main indicator of distinction is value vs reference semantics of the performed assignments. We certainly agree on this: Rhs is an array, is it compilable? a / b a=b a[]=b a=b[] a[]=b[] int[3u] / int[3u] ? ? ? true int[3u] / int[] ? ? ? true int[] / int[3u] ? ? ? true int[] / int[] ? ? ? true Now, a dynamic array a is equivalent to a[], and a static array b is equivalent to an lvalue slice b[]=. This gives the following equivalence classes of operations: Rhs is an array, is it compilable? a / b a=b a[]=b a=b[] a[]=b[] int[3u] / int[3u] 1 1 2 2 int[3u] / int[] 2 2 2 2 int[] / int[3u] 3 1 4 2 int[] / int[] 4 2 4 2 Any of the same class should behave the same. Now, you suggest in both proposals to allow at least one of class 2 and at least one of class 4. Filling all those out delivers: Rhs is an array, is it compilable? a / b a=b a[]=b a=b[] a[]=b[] int[3u] / int[3u] (1) (1) truetrue int[3u] / int[] truetruetruetrue int[] / int[3u] (3) (1) truetrue int[] / int[] truetruetruetrue 1 is assign value to value. 3. is assign value to reference. The upper left corner should certainly be true, values of any mutable type should be able to be assigned to themselves. This leaves: Rhs is an array, is it compilable? a / b a=b a[]=b a=b[] a[]=b[] int[3u] / int[3u] truetruetruetrue int[3u] / int[] truetruetruetrue int[] / int[3u] (3) truetruetrue int[] / int[] truetruetruetrue 3 is the odd thing out. Now let's think about it, what should: int[] a; int[3] b; a=b; do? The answer is, there are two options. 1. implicitly slice b 2. copy b by value into a One is as arbitrary as the other, so it should be disallowed in a sane design. Which leaves: Rhs is an array, is it compilable? a / b a=b a[]=b a=b[] a[]=b[] int[3u] / int[3u] truetruetruetrue int[3u] / int[] truetruetruetrue int[] / int[3u] FALSE truetruetrue int[] / int[] truetruetruetrue Rhs is a element, is it compilable? a a=N a[]=N a[0..2]=N int[3u] FALSE truetrue int[] false truetrue And that is how it should be. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6977] New: getErrno called as property in std.stdio
http://d.puremagic.com/issues/show_bug.cgi?id=6977 Summary: getErrno called as property in std.stdio Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: trivial Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: kyfo...@gmail.com --- Comment #0 from Kyle Foley kyfo...@gmail.com 2011-11-19 16:49:54 EST --- std.stdio: StdioException.opCall() calls getErrno like a property, but getErrno is not marked as a property. Compiling with -property switch generates an error. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6976] New: GetLastError called as property
http://d.puremagic.com/issues/show_bug.cgi?id=6976 Summary: GetLastError called as property Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: trivial Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: kyfo...@gmail.com --- Comment #0 from Kyle Foley kyfo...@gmail.com 2011-11-19 16:46:15 EST --- std.file: FileException ctor calls GetLastError like a property as default argument. This does not compile with -property switch because GetLastError is not marked as property. Also should consider using scope operator. The Posix version has the same problem when calling getErrno. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6755] Better wrong function pointer error message
http://d.puremagic.com/issues/show_bug.cgi?id=6755 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||patch Platform|Other |All OS/Version|Windows |All --- Comment #1 from Kenji Hara k.hara...@gmail.com 2011-11-19 13:51:12 PST --- I had already posted a patch for this issue as a part of other fix. https://github.com/D-Programming-Language/dmd/pull/429 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6941] .stringof displays redundant storage classes
http://d.puremagic.com/issues/show_bug.cgi?id=6941 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED --- Comment #4 from Walter Bright bugzi...@digitalmars.com 2011-11-19 14:44:18 PST --- https://github.com/D-Programming-Language/dmd/commit/fbe3325a5bdfbaa7d569d40c537307065b509a31 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6572] Deprecate typedef
http://d.puremagic.com/issues/show_bug.cgi?id=6572 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED --- Comment #5 from Walter Bright bugzi...@digitalmars.com 2011-11-19 20:21:01 PST --- https://github.com/D-Programming-Language/dmd/commit/a22fd423f3896dd17d59e39cdb809ba7721faad2 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6047] Segfault when struct with three or more ulongs with a toString is passed to format with at least two substitution clauses with -m64.
http://d.puremagic.com/issues/show_bug.cgi?id=6047 Nick Sabalausky cbkbbej...@mailinator.com changed: What|Removed |Added Severity|major |critical --- Comment #4 from Nick Sabalausky cbkbbej...@mailinator.com 2011-11-19 20:59:15 PST --- Raising priority because this is a rather nasty bug to come up against. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4831] Optlink failed to parse PATH env variable with -g option
http://d.puremagic.com/issues/show_bug.cgi?id=4831 Lionello Lunesu lio+bugzi...@lunesu.com changed: What|Removed |Added CC||lio+bugzi...@lunesu.com AssignedTo|nob...@puremagic.com|bugzi...@digitalmars.com --- Comment #1 from Lionello Lunesu lio+bugzi...@lunesu.com 2011-11-19 23:11:38 PST --- This bug is reported since 2004 and I'm still hitting it. Took me too long to find out what's wrong. OPTLINK fails when linking debug info and PATH has ++. I wonder how the first part relates to the second. Assigning to Walter. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 704] destructors are called even if the constructor throws an exception
http://d.puremagic.com/issues/show_bug.cgi?id=704 Lionello Lunesu lio+bugzi...@lunesu.com changed: What|Removed |Added CC||lio+bugzi...@lunesu.com --- Comment #6 from Lionello Lunesu lio+bugzi...@lunesu.com 2011-11-19 23:16:05 PST --- (In reply to comment #5) Default initializing object's fields doesn't mean full object construction. I do believe that an object should be considered constructed only if its constructor has completed successfully. Otherwise, the constructor should clean after itself and only deallocator (if any), but not destructor, should be run. Currently, deallocator is not run, meaning another bug in the compiler. for what it's worth: C# still calls the finalizer when the ctor throws. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3467] Non-int integral template parameters not correctly propagated
http://d.puremagic.com/issues/show_bug.cgi?id=3467 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||INVALID --- Comment #4 from Walter Bright bugzi...@digitalmars.com 2011-11-19 23:26:17 PST --- I believe this is not a bug. The type of a template is based on what its argument types are, not its parameter types. Hence, foo!3 is always a different type from: foo!3u even if foo is defined to take an int parameter. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3467] Non-int integral template parameters not correctly propagated
http://d.puremagic.com/issues/show_bug.cgi?id=3467 Jonathan M Davis jmdavisp...@gmx.com changed: What|Removed |Added CC||jmdavisp...@gmx.com --- Comment #5 from Jonathan M Davis jmdavisp...@gmx.com 2011-11-19 23:39:12 PST --- Why? I understand instantiating a different template with different arguments when the type itself is the argument. But when you've typed the argument, it's essentially the same as passing an argument to a function, only it's a template argument instead of a function argument. In this case, the template says that it takes a uint. I would expect that it then would instatiated based on the _value_ of the argument, not its _type_. It already _has_ a type - uint. Making foo!3 and foo!3u be different is just plain confusing because they're being given the exact same value. What value is there in having foo!3 and foo!3u be different? What does it add? I don't understand how the _type_ of the argument could matter when the type is already defined by the template and it's the value that changes between instantiations. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---