[Issue 8982] Assertion failure: '0' on line 353 in file 'ctfeexpr.c'
http://d.puremagic.com/issues/show_bug.cgi?id=8982 --- Comment #1 from Don clugd...@yahoo.com.au 2012-11-12 00:58:43 PST --- Somewhat reduced test case: template Bug8982(func...) { static if (is(typeof(func[0]) PT == __parameters)) { enum Bug8982 = ((PT[0..1] args) = args[0])(); } } struct V8982 { float x; } int func(ref const V8982 v = V8982(1) ){ return 1; } pragma(msg, Bug8982!func); The error occurs while evaluating the default argument. The resulting ErrorExp should not be passed to CTFE, though the question is, at which stage should it it be rejected? When instantiating the template? At is(__parameters)? Or when creating the delegate? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8999] New: Closure not detected for reference paramters of templated functions
http://d.puremagic.com/issues/show_bug.cgi?id=8999 Summary: Closure not detected for reference paramters of templated functions Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: wrong-code Severity: major Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: verylonglogin@gmail.com Blocks: 2573 --- Comment #0 from Denis Shelomovskij verylonglogin@gmail.com 2012-11-12 12:21:58 MSK --- In the following example closure isn't detected: --- import std.stdio; void copyDel()(out void delegate() dest, void delegate() src) { dest = src; } void g(out void delegate() del) { int i; void f() { writefln(i: %X (should be in heap), i); } copyDel(del, f); } void main() { int j; writefln(A heap address: %X, new int); writefln(A stack address: %X, j); void delegate() del; g(del); del(); } --- Output: --- A heap address: A01E70 A stack address: 12FE64 i: 12FE50 (should be in heap) - not in heap --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6768] Problem with init of struct members in presence of templated opAssign
http://d.puremagic.com/issues/show_bug.cgi?id=6768 Denis Shelomovskij verylonglogin@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||verylonglogin@gmail.com Resolution||DUPLICATE --- Comment #3 from Denis Shelomovskij verylonglogin@gmail.com 2012-11-12 12:25:48 MSK --- The issue isn't with `opAssign`. It is because closure isn't detected: --- import std.stdio; void setDel()(Foo foo, void delegate() del) { foo.del = del; } class Foo { void delegate() del; void f() { writefln(%X, %X (instance and ref addresses), cast(void*) this, this); void g() { writefln(%X, %X (instance and ref addresses from g), cast(void*) this, this); } setDel(this, g); writefln(%X (del.ptr), del.ptr); } void callDel() { writefln(+callDel); del(); writefln(-callDel); } } void main() { auto foo = new Foo(); foo.f(); foo.del(); foo.callDel(); foo.del(); } --- Output: --- A01E70, 12FE58 (instance and ref addresses) 12FE58 (del.ptr) 12FE58, 12FE58 (instance and ref addresses from g) +callDel A01E70, 12FE58 (instance and ref addresses from g) -callDel 12FE58, 12FE58 (instance and ref addresses from g) --- Created a new issue with corrected title and description. *** This issue has been marked as a duplicate of issue 8999 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8999] Closure not detected for reference paramters of templated functions
http://d.puremagic.com/issues/show_bug.cgi?id=8999 Denis Shelomovskij verylonglogin@gmail.com changed: What|Removed |Added CC||andrej.mitrov...@gmail.com --- Comment #1 from Denis Shelomovskij verylonglogin@gmail.com 2012-11-12 12:25:49 MSK --- *** Issue 6768 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9000] New: ICE on assigning struct's `init` to enum
http://d.puremagic.com/issues/show_bug.cgi?id=9000 Summary: ICE on assigning struct's `init` to enum Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: ice, 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-11-12 13:27:13 MSK --- --- struct S { ubyte i = ubyte.max; } enum e = S.init; --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9001] New: ICE on assigning expression tuple element with struct's `init` to enum
http://d.puremagic.com/issues/show_bug.cgi?id=9001 Summary: ICE on assigning expression tuple element with struct's `init` to enum Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: ice Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: verylonglogin@gmail.com --- Comment #0 from Denis Shelomovskij verylonglogin@gmail.com 2012-11-12 13:30:39 MSK --- --- struct S { int i = -1; } template expressionTuple(expressions...) { alias expressions expressionTuple; } alias expressionTuple!(S.init) exprTuple; enum es = exprTuple[0]; --- P.S. It's over nine thousand! -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7303] Erroneous closure behavior
http://d.puremagic.com/issues/show_bug.cgi?id=7303 --- Comment #3 from Denis Shelomovskij verylonglogin@gmail.com 2012-11-12 13:39:46 MSK --- (In reply to comment #1) Duplicate of bug 1841? Yes. The closure isn't detected. Writing `c` from `test.inner` showsw it is on stack but must be in heap. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1841] Closure detection doesn't work when variable is used in a nested function
http://d.puremagic.com/issues/show_bug.cgi?id=1841 Denis Shelomovskij verylonglogin@gmail.com changed: What|Removed |Added CC||dpx.infin...@gmail.com --- Comment #5 from Denis Shelomovskij verylonglogin@gmail.com 2012-11-12 13:42:26 MSK --- *** Issue 7303 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8982] Assertion failure: '0' on line 353 in file 'ctfeexpr.c'
http://d.puremagic.com/issues/show_bug.cgi?id=8982 --- Comment #2 from Don clugd...@yahoo.com.au 2012-11-12 02:46:28 PST --- Further reduced: void bug8982(ref const int v = 7 ){} static if (is(typeof(bug8982) P == __parameters)) { pragma(msg, ((P[0..1] g) = g[0])()); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9002] New: Document that `S s = S(...); ` will not create temporaries
http://d.puremagic.com/issues/show_bug.cgi?id=9002 Summary: Document that `S s = S(...);` will not create temporaries Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: spec Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: verylonglogin@gmail.com --- Comment #0 from Denis Shelomovskij verylonglogin@gmail.com 2012-11-12 13:47:32 MSK --- Unlike C++, you can't initialize structs in D like this: `S s(...);`. Documentation should be clear that `S s = S(...);` will not create temporaries i.e. will not call postblit or destructor. E.g. without such notes one can't be sure regular initialization will compile for a struct with disabled postblit. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1841] Closure detection doesn't work when variable is used in a nested function
http://d.puremagic.com/issues/show_bug.cgi?id=1841 Denis Shelomovskij verylonglogin@gmail.com changed: What|Removed |Added CC||verylonglogin@gmail.com Platform|x86 |All Version|2.010 |D2 OS/Version|Linux |All Severity|normal |major -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9003] New: Nested structs smetimes have null context pointers in static struct
http://d.puremagic.com/issues/show_bug.cgi?id=9003 Summary: Nested structs smetimes have null context pointers in static struct Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: wrong-code Severity: major Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: verylonglogin@gmail.com --- Comment #0 from Denis Shelomovskij verylonglogin@gmail.com 2012-11-12 15:59:31 MSK --- Currently it's allowed to have nested struct fields in static struct (or global templated structs): --- void main() { int i; struct NS { int n; // Comment to pass all asserts // int n2;// Uncomment to fail assert on line 19 int f() { return i; } } static struct SS1 { NS ns; } SS1 ss1; assert(ss1.ns != NS.init); static struct SS2 { NS ns1, ns2; } SS2 ss2; assert(ss2.ns1 != NS.init); // line 19 assert(ss2.ns2 != NS.init); static struct SS3 { int i; NS ns; } SS3 ss3; assert(ss3.ns != NS.init); static struct SS4 { int i; NS ns1, ns2; } SS4 ss4; assert(ss4.ns1 != NS.init); // fails assert(ss4.ns2 != NS.init); // fails } --- Exactly same behavior for global templated structs like `struct SS1(T) { T ns; }`. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9005] New: std.concurrency.spawn should allow `void delegate(Args) shared` for new Tid
http://d.puremagic.com/issues/show_bug.cgi?id=9005 Summary: std.concurrency.spawn should allow `void delegate(Args) shared` for new Tid Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: zan77...@nifty.com --- Comment #0 from SHOO zan77...@nifty.com 2012-11-12 05:14:19 PST --- This code should be allowed: -- import core.atomic, core.thread; import std.concurrency; import core.sync.barrier; class Foo { shared int a = 0; void bar(shared Barrier barrier) shared { while (1) { Thread.sleep(dur!msecs(10)); if (a.atomicLoad() 100) break; } (cast()barrier).wait(); } void countup() shared { foreach (i; 0..200) { Thread.sleep(dur!msecs(10)); a.atomicStore(i); } } } void main() { auto barrier = new Barrier(2); auto foo = new Foo; spawn(foo.bar, cast(shared)barrier); foo.countup(); barrier.wait(); } -- The Foo.bar is thread-safe. So, making new Tid by spawn with the shared member function is no problem. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9004] New: Wrong line number for undefined identifier error
http://d.puremagic.com/issues/show_bug.cgi?id=9004 Summary: Wrong line number for undefined identifier error Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: diagnostic Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-11-12 05:12:35 PST --- This is probably wrong code: struct Foo(_T) { alias _T T; } void bar(FooT)(FooT foo, FooT.T x) { } void main() { Foo!int foo; bar(foo, 1); // line 8 } DMD 2.061alpha gives: test.d(8): Error: undefined identifier FooT.T test.d(8): Error: template test.bar does not match any function template declaration test.d(8): Error: template test.bar(FooT) cannot deduce template function from argument types !()(Foo!(int),int) Note the line number where the undefined identifier FooT.T error is. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9006] New: Static struct with nested struct fields sometimes has current context pointers in `init`
http://d.puremagic.com/issues/show_bug.cgi?id=9006 Summary: Static struct with nested struct fields sometimes has current context pointers in `init` Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: wrong-code Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: verylonglogin@gmail.com --- Comment #0 from Denis Shelomovskij verylonglogin@gmail.com 2012-11-12 16:18:07 MSK --- --- void main() { int i; struct NS { int n; //int[3] a; // Uncomment to fail assert on line 20 and pass on line 23 int f() { return i; } } NS ns; assert(ns != NS.init); ns = NS.init; assert(ns == NS.init); static struct SS { NS ns; } assert(SS.init.ns == NS.init); // fails assert(SS.init.ns != NS());// fails SS s; assert(s.ns != NS.init); // line 20 assert(s != SS.init);// fails s = SS.init; assert(s.ns == NS.init); // line 23, fails assert(s == SS.init); } --- May be related to/duplicate of Bug 9003. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9004] Wrong line number for undefined identifier error
http://d.puremagic.com/issues/show_bug.cgi?id=9004 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added CC||andrej.mitrov...@gmail.com --- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-11-12 06:24:11 PST --- I don't think this is wrong code though.. You can declare `FooT.T x;` inside the function body, I don't see why it shouldn't be allowed in the function header. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8990] Forward reference error on three structs
http://d.puremagic.com/issues/show_bug.cgi?id=8990 --- Comment #3 from Don clugd...@yahoo.com.au 2012-11-12 07:07:59 PST --- Yes, looks identical to bug 6969 to me. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1599] compile time evaluation with immutable problem
http://d.puremagic.com/issues/show_bug.cgi?id=1599 Don clugd...@yahoo.com.au changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Comment #2 from Don clugd...@yahoo.com.au 2012-11-12 07:14:59 PST --- template foo(A...) { immutable(char)[] foo = A[0]; } static assert(foo!(a) == a); vug.d(2): Error: variable foo cannot be read at compile time vug.d(2):while evaluating: static assert(foo == a) This is because foo is a mutable run-time array of immutable(char). Not a bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1734] Inconsistent mixin behaviour
http://d.puremagic.com/issues/show_bug.cgi?id=1734 Don clugd...@yahoo.com.au changed: What|Removed |Added Severity|major |enhancement --- Comment #3 from Don clugd...@yahoo.com.au 2012-11-12 07:21:56 PST --- Current behaviour is intentional. Even this does not compile: - template init() { a = 5; } - This is an enhancement request. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9007] New: DMD-head Warnings about missing curl.lib when using -unittest
http://d.puremagic.com/issues/show_bug.cgi?id=9007 Summary: DMD-head Warnings about missing curl.lib when using -unittest Product: D Version: D2 Platform: All OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: andrej.mitrov...@gmail.com --- Comment #0 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-11-12 07:26:07 PST --- module test; import std.stdio; void main() { } 2.060: $ rdmd --force -unittest test.d 2.061 HEAD: $ rdmd --force -unittest test.d OPTLINK (R) for Win32 Release 8.00.12 Copyright (C) Digital Mars 1989-2010 All rights reserved. http://www.digitalmars.com/ctg/optlink.html curl.lib Warning 2: File Not Found curl.lib I really don't know what's causing it. The new RDMD behaves the same as the old one, and the imports to std.net.curl all seem to be the same in phobos head just like in 2.060. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2057] Unexpected type names with template typedefs
http://d.puremagic.com/issues/show_bug.cgi?id=2057 Don clugd...@yahoo.com.au changed: What|Removed |Added Version|2.014 |D1 --- Comment #1 from Don clugd...@yahoo.com.au 2012-11-12 07:25:52 PST --- Though marked as a D2-only bug, it's actually D1 only! struct foo(T) { T value; } template bar(T) { typedef foo!(T) bar; } void main() { pragma(msg, (bar!(int)).stringof); // prints 'bar' pragma(msg, (bar!(float)).stringof); // also prints 'bar' } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1944] is-expressions don't correctly define tuples named in the match expression
http://d.puremagic.com/issues/show_bug.cgi?id=1944 Don clugd...@yahoo.com.au changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WORKSFORME --- Comment #1 from Don clugd...@yahoo.com.au 2012-11-12 07:33:40 PST --- Works now, probably fixed years ago. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2128] Template function argument binding is too restrictive wrt qualifiers
http://d.puremagic.com/issues/show_bug.cgi?id=2128 Don clugd...@yahoo.com.au changed: What|Removed |Added Severity|normal |enhancement --- Comment #4 from Don clugd...@yahoo.com.au 2012-11-12 07:35:28 PST --- Changing to enhancement. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9008] New: Another forward referencing bug
http://d.puremagic.com/issues/show_bug.cgi?id=9008 Summary: Another forward referencing bug Product: D Version: D2 Platform: All OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: turkey...@gmail.com --- Comment #0 from Manu turkey...@gmail.com 2012-11-12 07:36:29 PST --- Rather complex situation, I couldn't boil it down anymore... Note the 2 commented lines; uncommenting these lines will make it work properly (this is my work-around) For some reason, scanning over each of the overloads in advance stops the forward reference error. This is tested using DMD-Win64. template TestHasAttribute( alias symbol, Attribute ) { template Impl( A... ) { static if( A.length == 0 ) enum bool Impl = false; else static if( is( typeof( A[0] ) == Attribute ) ) enum bool Impl = true; else enum bool Impl = Impl!( A[1..$] ); } alias Impl!( __traits( getAttributes, symbol ) ) TestHasAttribute; } string generateImportStubs( alias reference )() { string text; foreach( m; __traits( allMembers, reference ) ) { // scan for functions... static if( is( typeof( mixin( m ) ) ) is( typeof( mixin( m ) ) == function ) ) { // uncomment these lines, and the bug disappears //foreach( i, overload; __traits( getOverloads, reference, m ) ) //enum nothing = typeof(overload).stringof; foreach( i, overload; __traits( getOverloads, reference, m ) ) { static if( TestHasAttribute!( overload, int ) ) text ~= ; // mixin some stuff, irrelevant to the bug... } } } return text; } import std.traits; mixin( alias ~ moduleName!generateImportStubs ~ TestThisModule; ); mixin( generateImportStubs!( TestThisModule )() ); private: // overloads cause errors void overload(); void overload( int x ); test.d(124): Error: template instance remedy.test.TestHasAttribute!(overload, int) forward reference of overload test.d(124): Error: template instance remedy.test.TestHasAttribute!(overload, int) error instantiating test.d(135):instantiated from here: generateImportStubs!(test) test.d(135):called from here: generateImportStubs() test.d(135): Error: argument to mixin must be a string, not (generateImportStubs()) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9009] New: allow foreach without identifier
http://d.puremagic.com/issues/show_bug.cgi?id=9009 Summary: allow foreach without identifier Product: D Version: unspecified 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 2012-11-12 07:57:54 PST --- Minor enhancement request, but the language should allow using foreach without specifying an iteration name. THis can be useful when you want to iterate a fixed amount, without caring about the index. For example, when you want to popFrontN exactly (popFrontN is safe, so slightly slower), you'd want to write: foreach( ; 0 .. n ) r.popFront(); Right now, if you do this, you get: main.d(5): Error: basic type expected, not ; main.d(5): Error: no identifier for declarator int for can do without declarators, I don't see why foreach can't have the above syntax. Just a minor ER, but I think it would make foreach that little extra user friendly. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8970] Tuple should support conversion from tuple with unnamed fields to tuple with named fields
http://d.puremagic.com/issues/show_bug.cgi?id=8970 Simen Kjaeraas simen.kja...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #1 from Simen Kjaeraas simen.kja...@gmail.com 2012-11-12 08:49:08 PST --- *** This issue has been marked as a duplicate of issue 8570 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8570] Tuples without named fields should implicitly convert to tuples with named fields when returned from a function
http://d.puremagic.com/issues/show_bug.cgi?id=8570 --- Comment #1 from Simen Kjaeraas simen.kja...@gmail.com 2012-11-12 08:49:08 PST --- *** Issue 8970 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9010] New: opEquals() const results in not-covered code
http://d.puremagic.com/issues/show_bug.cgi?id=9010 Summary: opEquals() const results in not-covered code Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: trivial Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: purema...@mikevandongen.nl --- Comment #0 from Mike van Dongen purema...@mikevandongen.nl 2012-11-12 10:18:51 PST --- When I use `bool opEquals(A o)`, the compiler says my code is completely covered. The 000 doesn't appear, nor does any other number. Changing the method opEquals to a const results in not-covered code, while nothing else changes. |void main() {} | |struct A 000|{ |bool opEquals(A o) const |{ 1|return false; |} | |unittest |{ 1|auto a = A(); 1|auto b = A(); 1|assert(a != b); |} |} -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8596] Indeterministic assertion failure in rehash
http://d.puremagic.com/issues/show_bug.cgi?id=8596 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added CC||bugzi...@digitalmars.com --- Comment #3 from Walter Bright bugzi...@digitalmars.com 2012-11-12 11:50:58 PST --- The assert happens when more than one item in the hash table has the same key. A hash table may only have one item per key. It would be helpful if you could run it under linux or osx, compile dmd with -g, and get a stack trace. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8596] Indeterministic assertion failure in rehash
http://d.puremagic.com/issues/show_bug.cgi?id=8596 deadalnix deadal...@gmail.com changed: What|Removed |Added Severity|major |normal --- Comment #4 from deadalnix deadal...@gmail.com 2012-11-12 12:20:48 PST --- (In reply to comment #3) The assert happens when more than one item in the hash table has the same key. A hash table may only have one item per key. It would be helpful if you could run it under linux or osx, compile dmd with -g, and get a stack trace. I fail to trigger the error when using gdb. Seems like gdb is influencing on what does trigger the error. The error trigger as well when dmd is compiled with -g . Looks like a race condition. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7003] no tuple expansion for c++ mangling
http://d.puremagic.com/issues/show_bug.cgi?id=7003 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED --- Comment #2 from Walter Bright bugzi...@digitalmars.com 2012-11-12 12:32:39 PST --- https://github.com/D-Programming-Language/dmd/pull/532 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8596] Indeterministic assertion failure in rehash
http://d.puremagic.com/issues/show_bug.cgi?id=8596 --- Comment #5 from Walter Bright bugzi...@digitalmars.com 2012-11-12 12:39:20 PST --- dmd isn't multithreaded, so it could not be a race condition. It does, however, sound like memory corruption. Can you run it under valgrind? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8596] Indeterministic assertion failure in rehash
http://d.puremagic.com/issues/show_bug.cgi?id=8596 --- Comment #6 from deadalnix deadal...@gmail.com 2012-11-12 12:45:50 PST --- (In reply to comment #5) dmd isn't multithreaded, so it could not be a race condition. It does, however, sound like memory corruption. Can you run it under valgrind? Already tryed, but I don't have enough RAM on my machine to do so. Consider that compiling the project require more than 2.2Gb of RAM without valgrind. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8596] Indeterministic assertion failure in rehash
http://d.puremagic.com/issues/show_bug.cgi?id=8596 --- Comment #7 from Walter Bright bugzi...@digitalmars.com 2012-11-12 12:51:20 PST --- If you're running the 64 bit dmd, shouldn't it be able to use far more virtual memory (very slowly)? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8596] Indeterministic assertion failure in rehash
http://d.puremagic.com/issues/show_bug.cgi?id=8596 Alex R�nne Petersen a...@lycus.org changed: What|Removed |Added CC||a...@lycus.org --- Comment #8 from Alex R�nne Petersen a...@lycus.org 2012-11-12 21:54:31 CET --- Well, only if paging is enabled (i.e. there is a swap partition in use). I know I set my systems up without paging because I practically never need it. @deadalnix How much RAM does your system have? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8596] Indeterministic assertion failure in rehash
http://d.puremagic.com/issues/show_bug.cgi?id=8596 --- Comment #9 from deadalnix deadal...@gmail.com 2012-11-12 14:00:55 PST --- (In reply to comment #8) Well, only if paging is enabled (i.e. there is a swap partition in use). I know I set my systems up without paging because I practically never need it. @deadalnix How much RAM does your system have? I have 4Gb. Minus what the system uses plus some programs running, it is already swapping when dmd uses 2.2Gb. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8596] Indeterministic assertion failure in rehash
http://d.puremagic.com/issues/show_bug.cgi?id=8596 --- Comment #10 from deadalnix deadal...@gmail.com 2012-11-12 14:06:19 PST --- (In reply to comment #9) (In reply to comment #8) Well, only if paging is enabled (i.e. there is a swap partition in use). I know I set my systems up without paging because I practically never need it. @deadalnix How much RAM does your system have? I have 4Gb. Minus what the system uses plus some programs running, it is already swapping when dmd uses 2.2Gb. OK, I did ran valgrind into a terminal without any graphical interface. I hope I'll not run out of swap because of the memory I won disabling the graphical interface. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8596] Indeterministic assertion failure in rehash
http://d.puremagic.com/issues/show_bug.cgi?id=8596 --- Comment #11 from deadalnix deadal...@gmail.com 2012-11-12 15:48:04 PST --- Created an attachment (id=1160) valgrind output -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9011] New: One more strongly pure case
http://d.puremagic.com/issues/show_bug.cgi?id=9011 Summary: One more strongly pure case Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: enhancement Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-11-12 15:56:39 PST --- Maybe Hara has already a patch for this, but I don't remember its location. I think it's good to refine the D purity to allow this code: int[] foo1(int x) pure { return null; } ubyte[] foo2(string s) pure { return null; } void main() { immutable a1 = foo1(10); // OK immutable a2 = foo2(hello); // currently error } Currently in DMD 2.061alpha it gives: test.d(9): Error: cannot implicitly convert expression (foo2(hello)) of type ubyte[] to immutable(ubyte[]) This enhancement means that foo2 becomes strongly pure. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9000] ICE on assigning struct's `init` to enum
http://d.puremagic.com/issues/show_bug.cgi?id=9000 --- Comment #1 from github-bugzi...@puremagic.com 2012-11-12 16:42:00 PST --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f02ffead744d1aa5751562691f6c5113089b9b7a fix Issue 9000 - ICE on assigning struct's to enum -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9000] ICE on assigning struct's `init` to enum
http://d.puremagic.com/issues/show_bug.cgi?id=9000 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 9001] ICE on assigning expression tuple element with struct's `init` to enum
http://d.puremagic.com/issues/show_bug.cgi?id=9001 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||DUPLICATE --- Comment #1 from Walter Bright bugzi...@digitalmars.com 2012-11-12 16:43:21 PST --- *** This issue has been marked as a duplicate of issue 9000 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9000] ICE on assigning struct's `init` to enum
http://d.puremagic.com/issues/show_bug.cgi?id=9000 --- Comment #2 from Walter Bright bugzi...@digitalmars.com 2012-11-12 16:43:21 PST --- *** Issue 9001 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9012] New: writef/format inconsistent with format specifier
http://d.puremagic.com/issues/show_bug.cgi?id=9012 Summary: writef/format inconsistent with format specifier Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: andrej.mitrov...@gmail.com --- Comment #0 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-11-12 16:50:03 PST --- 2.060 and git head: import std.string; import std.stdio; void main() { writefln(Set!%s(%(%s, %)), int, [1, 2]); // Set!int(1, 2) string s = format(Set!%s(%(%s, %)), int, [1, 2]); // format error } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9012] writef/format inconsistent with format specifier
http://d.puremagic.com/issues/show_bug.cgi?id=9012 --- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-11-12 16:51:03 PST --- xformat works ok though. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8596] Indeterministic assertion failure in rehash
http://d.puremagic.com/issues/show_bug.cgi?id=8596 --- Comment #12 from Walter Bright bugzi...@digitalmars.com 2012-11-12 16:56:17 PST --- (In reply to comment #11) Created an attachment (id=1160) [details] valgrind output Fixed the valgrind reported issue. It's definitely a corruption bug in the aa.c code. Testing now. If you want to try it out: == diff aa.bak aa.c 72c72 delete en; --- delete [] en; 79c79 delete en; --- delete [] en; == I love valgrind. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8596] Indeterministic assertion failure in rehash
http://d.puremagic.com/issues/show_bug.cgi?id=8596 --- Comment #13 from Walter Bright bugzi...@digitalmars.com 2012-11-12 17:09:08 PST --- https://github.com/D-Programming-Language/dmd/commit/80884506df7a020e879ba3adda5a98d0465e7164 I won't mark it fixed until you guys can verify, as I don't have your test code. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8596] Indeterministic assertion failure in rehash
http://d.puremagic.com/issues/show_bug.cgi?id=8596 --- Comment #14 from deadalnix deadal...@gmail.com 2012-11-12 17:21:20 PST --- (In reply to comment #13) https://github.com/D-Programming-Language/dmd/commit/80884506df7a020e879ba3adda5a98d0465e7164 I won't mark it fixed until you guys can verify, as I don't have your test code. Bad news : just tested the patch and got 6 out of 10 compilation failed on this assert. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8596] Indeterministic assertion failure in rehash
http://d.puremagic.com/issues/show_bug.cgi?id=8596 --- Comment #16 from deadalnix deadal...@gmail.com 2012-11-12 17:35:10 PST --- (In reply to comment #15) (In reply to comment #14) Bad news : just tested the patch and got 6 out of 10 compilation failed on this assert. What do you mean? Dmd won't compile? No, dmd compile :D But my program didn't using that patched dmd 6 time out of 10. It means that the issue remains. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9013] New: Compiler crash with foreach on wrongly defined interval
http://d.puremagic.com/issues/show_bug.cgi?id=9013 Summary: Compiler crash with foreach on wrongly defined interval Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-11-12 18:23:22 PST --- void main() { foreach (i; 0 .. missing) int[] foo = cast(int[])[i]; } DMD 2.061alpha prints this and then crashes: test.d(2): Error: undefined identifier missing -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8596] Indeterministic assertion failure in rehash
http://d.puremagic.com/issues/show_bug.cgi?id=8596 bearophile_h...@eml.cc changed: What|Removed |Added CC||bearophile_h...@eml.cc --- Comment #17 from bearophile_h...@eml.cc 2012-11-12 18:22:33 PST --- (In reply to comment #16) It means that the issue remains. Then I suggest to run it again in Valgrind :-) Maybe there are other bugs to fix it spots. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9011] One more strongly pure case
http://d.puremagic.com/issues/show_bug.cgi?id=9011 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added See Also||http://d.puremagic.com/issu ||es/show_bug.cgi?id=8408 --- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-11-12 20:12:05 PST --- Related: issue 8408 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7220] Bad initialization when using mixin to generate a static field in a -lib'rary
http://d.puremagic.com/issues/show_bug.cgi?id=7220 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added CC||bugzi...@digitalmars.com --- Comment #3 from Walter Bright bugzi...@digitalmars.com 2012-11-12 20:24:17 PST --- This gets quite a bit simpler: -- faulty.d - module faulty; import core.stdc.stdio; mixin template DefineCoreType(string type) { class Faulty { static int x; static void instance() { printf(Faulty.instance()\n); x = 3; } static this() { printf(Faulty.static this\n); } } } mixin DefineCoreType!(Faulty); -- bar.d - import core.stdc.stdio, faulty; static this() { Faulty.instance(); assert(Faulty.x == 3); printf(bar.static this\n); } private int main(string[] args) { printf(Main\n); return 0; } -- dmd -lib faulty dmd bar faulty.lib bar -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8408] Purity calculation should be improved
http://d.puremagic.com/issues/show_bug.cgi?id=8408 --- Comment #4 from bearophile_h...@eml.cc 2012-11-12 20:23:55 PST --- *** Issue 9011 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9014] New: [ICE](glue.c line 1225) with array.front and missing array
http://d.puremagic.com/issues/show_bug.cgi?id=9014 Summary: [ICE](glue.c line 1225) with array.front and missing array Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-11-12 20:25:06 PST --- foo() is reduced from array.front: @property ref int foo(int[] a) { return a[0]; } void main() { int[] bar; bar.foo = missing.foo; } DMD 2.061alpha prints: Assertion failure: '0' on line 1225 in file 'glue.c' -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9015] New: std.container.DList.opOpAssign missing return
http://d.puremagic.com/issues/show_bug.cgi?id=9015 Summary: std.container.DList.opOpAssign missing return Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-11-12 20:27:34 PST --- This is from std.container.DList, it returns nothing: DList opOpAssign(string op, Stuff)(Stuff rhs) if (op == ~ isImplicitlyConvertible!(Stuff, T)) { if (_last) _last._next = rhs._first; if (rhs._first) rhs_.first._prev = _last; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9016] New: swap() doesn't work with std.container.DList.front and back
http://d.puremagic.com/issues/show_bug.cgi?id=9016 Summary: swap() doesn't work with std.container.DList.front and back Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-11-12 20:31:03 PST --- std.container.DList supports a manually written swap of its front and back items, but it seems std.algorithm.swap() on them is not supported: import std.stdio, std.algorithm, std.container; void main() { auto L = DList!int([10, 20, 30]); writeln(L[]); // [10, 20, 30] auto aux = L.front; L.front = L.back; L.back = aux; writeln(L[]); // [30, 20, 10] //swap(L.front, L.back); } If you uncomment the swap dmd 2.061alpha gives: test.d(9): Error: template std.algorithm.swap does not match any function template declaration ...\dmd2\src\phobos\std\algorithm.d(1767): Error: template std.algorithm.swap cannot deduce template function from argument types !()(int,int) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9017] New: __traits(compiles, { enum e = expression tuple; }) is true but code doesn't compile
http://d.puremagic.com/issues/show_bug.cgi?id=9017 Summary: __traits(compiles, { enum e = expression tuple; }) is true but code doesn't compile 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-11-13 10:27:10 MSK --- --- template X(Args...) { static if(__traits(compiles, { enum e = Args; })) enum e = Args; } alias X!0 X0; // line 7 --- Output: --- main.d(7): Error: cannot cast int to (int) main.d(7): Error: template instance main.X!(0) error instantiating --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7220] Bad initialization when using mixin to generate a static field in a -lib'rary
http://d.puremagic.com/issues/show_bug.cgi?id=7220 Walter Bright bugzi...@digitalmars.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 7220] Bad initialization when using mixin to generate a static field in a -lib'rary
http://d.puremagic.com/issues/show_bug.cgi?id=7220 --- Comment #4 from github-bugzi...@puremagic.com 2012-11-12 23:43:47 PST --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/af887b44f3bd592973037a2dc8f5ec91cc8b2626 fix Issue 7220 - Bad initialization when using mixin to generate a static field in a -lib'rary -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 785] Make 'cent' and 'ucent' syntactically valid pending implementation
http://d.puremagic.com/issues/show_bug.cgi?id=785 Don clugd...@yahoo.com.au changed: What|Removed |Added Status|REOPENED|RESOLVED Version|D1 |D2 Resolution||FIXED Summary|(D1 only) Make 'cent' and |Make 'cent' and 'ucent' |'ucent' syntactically valid |syntactically valid pending |pending implementation |implementation --- Comment #31 from Don clugd...@yahoo.com.au 2012-11-12 23:49:29 PST --- Closing since fixed on D2. Doesn't make sense for D1. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 620] Can't use property syntax with a template function
http://d.puremagic.com/issues/show_bug.cgi?id=620 Don clugd...@yahoo.com.au changed: What|Removed |Added Status|ASSIGNED|RESOLVED Version|D1 |D2 Resolution||FIXED --- Comment #8 from Don clugd...@yahoo.com.au 2012-11-12 23:48:20 PST --- Closing since fixed on D2. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 855] Improve performance
http://d.puremagic.com/issues/show_bug.cgi?id=855 Don clugd...@yahoo.com.au changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Comment #2 from Don clugd...@yahoo.com.au 2012-11-12 23:50:24 PST --- There is nothing actionable in this bug report. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 790] arbitrary lookahead for nested functions
http://d.puremagic.com/issues/show_bug.cgi?id=790 Don clugd...@yahoo.com.au changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||WONTFIX --- Comment #7 from Don clugd...@yahoo.com.au 2012-11-12 23:52:06 PST --- OK, then close as wontfix. It could also be invalid. Makes no difference. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---