[Issue 4159] in expression parsed as template
http://d.puremagic.com/issues/show_bug.cgi?id=4159 kenn...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||kenn...@gmail.com Resolution||DUPLICATE --- Comment #1 from kenn...@gmail.com 2011-07-14 00:46:04 PDT --- *** This issue has been marked as a duplicate of issue 5785 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5785] Lexing or Parsing issue with UFCS
http://d.puremagic.com/issues/show_bug.cgi?id=5785 kenn...@gmail.com changed: What|Removed |Added CC||k-fo...@onu.edu --- Comment #7 from kenn...@gmail.com 2011-07-14 00:46:04 PDT --- *** Issue 4159 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 3052] Passing alias to member function does not work (2/2)
http://d.puremagic.com/issues/show_bug.cgi?id=3052 Trass3r mrmoc...@gmx.de changed: What|Removed |Added CC||mrmoc...@gmx.de --- Comment #1 from Trass3r mrmoc...@gmx.de 2011-07-14 01:02:14 PDT --- This is because dmd checks in TemplateInstance::hasNestedArgs that the template declaration is in module scope: if (tempdecl-toParent()-isModule()) And with a little hack: // if module level template or a static member of an aggregate // NOTE not sure if there is a better way to determine the storage class of a templated class method if (tempdecl-toParent()-isModule() || (tempdecl-isMember() tempdecl-scope-stc STCstatic)) we get Error: need 'this' to access member next -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6310] New: Missing template instantiation traceback when an error happens in the template parameter of an alias.
http://d.puremagic.com/issues/show_bug.cgi?id=6310 Summary: Missing template instantiation traceback when an error happens in the template parameter of an alias. Product: D Version: D2 Platform: Other OS/Version: Mac OS X Status: NEW Keywords: diagnostic Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: kenn...@gmail.com --- Comment #0 from kenn...@gmail.com 2011-07-14 01:05:17 PDT --- (I believe there's a duplicate, but I can't find it.) Test case -- template RT(alias f) { alias int RT; } template F(T) { alias RT!(T.dsfsdf) X; // line 5 } pragma(msg, F!(int)); // line 7 -- x.d(5): Error: no property 'dsfsdf' for type 'int' -- There should be another error x.d(7): Error: template instance x.F!(int) error instantiating Many Phobos template e.g. ForeachType suffer from this missing traceback. The error doesn't happen in D1, apparently. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6310] Missing template instantiation traceback when an error happens in the template parameter of an alias.
http://d.puremagic.com/issues/show_bug.cgi?id=6310 --- Comment #1 from kenn...@gmail.com 2011-07-14 01:55:44 PDT --- More sophisticated test case which may be due to a different cause. -- template SL () { enum SL = 1; } template RT(alias T) if (SL!() == 1) { alias int RT; } template F(T) { alias RT!({ return T.init; }) F; // line 8 } pragma(msg, F!(void)); // line 10 -- x.d(8): Error: void does not have an initializer x.d(8): Error: void does not have a default initializer -- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6311] New: Some array ops aren't nothrow
http://d.puremagic.com/issues/show_bug.cgi?id=6311 Summary: Some array ops aren't nothrow Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: druntime AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2011-07-14 02:32:51 PDT --- void foo(int[] a) nothrow { a[] = a[]; // OK a[] = a[] + a[]; a[] += a[]; } void main() {} DMD 2.054 gives: test.d(3): Error: _arraySliceSliceAddSliceAssign_i is not nothrow test.d(4): Error: _arraySliceSliceAddass_i is not nothrow test.d(1): Error: function test.foo 'foo' is nothrow yet may throw -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2779] alias this + tuple expansion on function call doesn't work
http://d.puremagic.com/issues/show_bug.cgi?id=2779 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||patch CC||k.hara...@gmail.com --- Comment #1 from Kenji Hara k.hara...@gmail.com 2011-07-14 04:17:04 PDT --- Patch: https://github.com/D-Programming-Language/dmd/pull/74 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6312] New: template instance cannot use argument from enclosing template
http://d.puremagic.com/issues/show_bug.cgi?id=6312 Summary: template instance cannot use argument from enclosing template 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: mrmoc...@gmx.de --- Comment #0 from Trass3r mrmoc...@gmx.de 2011-07-14 04:16:39 PDT --- extern(C) void printf(const char*, ...); void h() { printf(h()); } class Bla { mixin wrap!h; } mixin template wrap(alias f) { void blub(alias g = f)() { g(); } } void main() { Bla b = new Bla(); b.blub(); } $ dmd -c nonlocaltemplate.d nonlocaltemplate.d(20): Error: template instance cannot use local 'f' as parameter to non-global template blub(alias g = f) nonlocaltemplate.d(20): Error: template instance forward reference of f nonlocaltemplate.d(20): Error: template instance nonlocaltemplate.Bla.wrap!(h).blub!(f) error instantiating Note that imho this is different from http://d.puremagic.com/issues/show_bug.cgi?id=3051 because here the argument is not on the stack but it's a template argument (and thus a compile-time value) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2781] alias this doesn't work with foreach
http://d.puremagic.com/issues/show_bug.cgi?id=2781 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||patch CC||k.hara...@gmail.com --- Comment #1 from Kenji Hara k.hara...@gmail.com 2011-07-14 04:18:04 PDT --- Patch: https://github.com/D-Programming-Language/dmd/pull/74 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5896] const overload matching is succumb to template parameter one
http://d.puremagic.com/issues/show_bug.cgi?id=5896 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||patch, rejects-valid --- Comment #3 from Kenji Hara k.hara...@gmail.com 2011-07-14 04:20:08 PDT --- Patch and discussions: https://github.com/D-Programming-Language/dmd/pull/45 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5046] Wrong type of implicit 'this' in struct/class templates
http://d.puremagic.com/issues/show_bug.cgi?id=5046 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||patch CC||k.hara...@gmail.com --- Comment #1 from Kenji Hara k.hara...@gmail.com 2011-07-14 04:22:25 PDT --- https://github.com/D-Programming-Language/dmd/pull/94 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4444] Cannot index built-in array with expression tuple
http://d.puremagic.com/issues/show_bug.cgi?id= Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||patch CC||k.hara...@gmail.com --- Comment #1 from Kenji Hara k.hara...@gmail.com 2011-07-14 04:23:04 PDT --- https://github.com/D-Programming-Language/dmd/pull/105 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1904] wrong protection lookup for private template functions
http://d.puremagic.com/issues/show_bug.cgi?id=1904 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||patch CC||k.hara...@gmail.com --- Comment #3 from Kenji Hara k.hara...@gmail.com 2011-07-14 04:23:51 PDT --- D2 patch: https://github.com/D-Programming-Language/dmd/pull/107 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1471] Linker error on template function. Error 42: Symbol Undefined ...
http://d.puremagic.com/issues/show_bug.cgi?id=1471 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||patch CC||k.hara...@gmail.com --- Comment #4 from Kenji Hara k.hara...@gmail.com 2011-07-14 04:24:28 PDT --- D2 patch: https://github.com/D-Programming-Language/dmd/pull/108 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2579] Template function accepting a delegate with in argument doesn't compile
http://d.puremagic.com/issues/show_bug.cgi?id=2579 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||patch CC||k.hara...@gmail.com --- Comment #1 from Kenji Hara k.hara...@gmail.com 2011-07-14 04:25:09 PDT --- https://github.com/D-Programming-Language/dmd/pull/111 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3273] Regression(2.031): struct invariant + dtor fails to compile (no line number)
http://d.puremagic.com/issues/show_bug.cgi?id=3273 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added CC||k.hara...@gmail.com --- Comment #10 from Kenji Hara k.hara...@gmail.com 2011-07-14 04:26:39 PDT --- https://github.com/D-Programming-Language/dmd/pull/139 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5039] Cannot use invariant() with auto methods
http://d.puremagic.com/issues/show_bug.cgi?id=5039 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||patch, rejects-valid CC||k.hara...@gmail.com --- Comment #1 from Kenji Hara k.hara...@gmail.com 2011-07-14 04:29:09 PDT --- https://github.com/D-Programming-Language/dmd/pull/147 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4785] auto return of a function with in contract
http://d.puremagic.com/issues/show_bug.cgi?id=4785 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||patch CC||k.hara...@gmail.com --- Comment #4 from Kenji Hara k.hara...@gmail.com 2011-07-14 04:28:47 PDT --- https://github.com/D-Programming-Language/dmd/pull/147 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5363] const + alias this = wrong code
http://d.puremagic.com/issues/show_bug.cgi?id=5363 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||patch --- Comment #2 from Kenji Hara k.hara...@gmail.com 2011-07-14 04:31:02 PDT --- https://github.com/D-Programming-Language/dmd/pull/173 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1684] offsetof does not work, adding cast is workaround
http://d.puremagic.com/issues/show_bug.cgi?id=1684 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||patch CC||k.hara...@gmail.com --- Comment #1 from Kenji Hara k.hara...@gmail.com 2011-07-14 04:32:38 PDT --- https://github.com/D-Programming-Language/dmd/pull/230 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1684] offsetof does not work, adding cast is workaround
http://d.puremagic.com/issues/show_bug.cgi?id=1684 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Version|1.023 |D1 D2 --- Comment #2 from Kenji Hara k.hara...@gmail.com 2011-07-14 04:34:51 PDT --- This problem occurs also in D2. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2234] __traits(allMembers) returns incorrect results for mixin and template alias members of an aggregate
http://d.puremagic.com/issues/show_bug.cgi?id=2234 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||patch CC||k.hara...@gmail.com --- Comment #2 from Kenji Hara k.hara...@gmail.com 2011-07-14 04:35:40 PDT --- https://github.com/D-Programming-Language/dmd/pull/231 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2245] Bug with overloaded, mixin template functions in classes
http://d.puremagic.com/issues/show_bug.cgi?id=2245 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||patch CC||k.hara...@gmail.com --- Comment #2 from Kenji Hara k.hara...@gmail.com 2011-07-14 04:36:20 PDT --- https://github.com/D-Programming-Language/dmd/pull/250 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2774] Functions-as-properties makes it impossible to get the .mangleof a function
http://d.puremagic.com/issues/show_bug.cgi?id=2774 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added CC||k.hara...@gmail.com Version|1.041 |D1 D2 --- Comment #6 from Kenji Hara k.hara...@gmail.com 2011-07-14 04:37:42 PDT --- https://github.com/D-Programming-Language/dmd/pull/251 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6014] rt_finalize Segmentation fault , dmd 2.053 on linux freebsd
http://d.puremagic.com/issues/show_bug.cgi?id=6014 --- Comment #6 from Steven Schveighoffer schvei...@yahoo.com 2011-07-14 04:47:25 PDT --- A stack trace would help. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6313] New: Type deduction with const/in
http://d.puremagic.com/issues/show_bug.cgi?id=6313 Summary: Type deduction with const/in Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2011-07-14 04:50:53 PDT --- A D2 program: T[] foo(T)(const T[] x) { //static assert(is(U == int)); // false static assert(is(T == const(int))); return new T[1]; } U[] bar(U)(const U[] y) { static assert(is(U == int)); return foo(y); } void main() { bar([1]); } DMD 2.054 gives: test.d(8): Error: cannot implicitly convert expression (foo(y)) of type const(int)[] to int[] test.d(11): Error: template instance test.bar!(int) error instantiating This causes me problems because many of my functions have in arguments. When they call each other they don't compile, as in this example (here I have used const arguments just for clarity). To solve the problem I have had to use code like this, that I don't like a lot: Unqual![] foo(T)(const T[] x) { return new Unqual!T[1]; } U[] bar(U)(const U[] y) { return foo(y); } void main() { bar([1]); } So, is it possible (and good) to change DMD so the type T of foo is int instead of const(int)? See also comments by Daniel Murphy: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learnarticle_id=28147 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6314] New: insertInPlace does not work for classes on dmd 2.054
http://d.puremagic.com/issues/show_bug.cgi?id=6314 Summary: insertInPlace does not work for classes on dmd 2.054 Product: D Version: D2 Platform: Other OS/Version: Linux Status: NEW Severity: regression Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: mj...@clix.pt --- Comment #0 from marcode mj...@clix.pt 2011-07-14 05:35:24 PDT --- The following code: import std.array; class A {} void main() { A[] arr; arr.insertInPlace(0,new A); } fails to compile on dmd 2.054, with the following error: /usr/include/d/phobos/std/array.d(753): Error: template std.conv.emplace(T) if (!is(T == class)) does not match any function template declaration /usr/include/d/phobos/std/array.d(753): Error: template std.conv.emplace(T) if (!is(T == class)) cannot deduce template function from argument types !(A)(A*,A) /usr/include/d/phobosstd/array.d(753): Error: template instance errors instantiating template It worked for dmd 2.053. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6315] New: Compiling typed named enum with -g switch yelds an error.
http://d.puremagic.com/issues/show_bug.cgi?id=6315 Summary: Compiling typed named enum with -g switch yelds an error. Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: kajetan.rzepecki+purema...@gmail.com --- Comment #0 from Kajtek kajetan.rzepecki+purema...@gmail.com 2011-07-14 05:55:54 PDT --- Tested with DMD 2.054 on Win32. Didn't happen in DMD 2.053. enum : string {//OK A = A, } enum Enum : string { B = B, //Error: Integer constant expression expected instead of B. } void main() {} -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6316] New: Class downcast is rejected in @safe code
http://d.puremagic.com/issues/show_bug.cgi?id=6316 Summary: Class downcast is rejected in @safe code Product: D Version: D2 Platform: x86 OS/Version: Mac OS X Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: htven...@gmail.com --- Comment #0 from Harry Vennik htven...@gmail.com 2011-07-14 06:30:27 PDT --- The D language specification does not forbid downcasting in @safe code, but the compiler rejects it. Downcasting is actually safe because such casts are checked run-time. The minimal testcase is: --- CODE --- class A { } class B : A { } @safe void main() { A a = new A(); B b = cast(B) a; } - END CODE - The above code is rejected by the compiler with the following message: safe_downcast.d(7): Error: cast from safe_downcast.A to safe_downcast.B not allowed in safe code Possible enhancement: make DMD issue a warning if the result of a downcast is not checked for null. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6316] Class downcast is rejected in @safe code
http://d.puremagic.com/issues/show_bug.cgi?id=6316 kenn...@gmail.com changed: What|Removed |Added CC||kenn...@gmail.com --- Comment #1 from kenn...@gmail.com 2011-07-14 06:46:17 PDT --- You should use std.conv.to, and then in Phobos the toImpl specialization T toImpl(T, S)(S value) if (!isImplicitlyConvertible!(S, T) is(S : Object) !is(typeof(value.opCast!T()) : T) is(T : Object) !is(typeof(new T(value should be made @trusted. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6317] New: A inner struct with member function causes a compiler internal error
http://d.puremagic.com/issues/show_bug.cgi?id=6317 Summary: A inner struct with member function causes a compiler internal error Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bitwo...@qq.com --- Comment #0 from Heromyth bitwo...@qq.com 2011-07-14 07:18:58 PDT --- If struct Relative is defined at the outer of doTest(), everything is OK. Here are the test codes: = import std.stdio; void doTest() { struct Relative { int xBase; int xDir; // This method causes a compiler internal error void MoveTo() { } } Relative rel = {1, 2}; } int main(string[] args) { return 0; } = -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6316] Regression(2.054): Class downcast is rejected in @safe code
http://d.puremagic.com/issues/show_bug.cgi?id=6316 yebblies yebbl...@gmail.com changed: What|Removed |Added Keywords||patch, rejects-valid CC||yebbl...@gmail.com Platform|x86 |All Summary|Class downcast is rejected |Regression(2.054): Class |in @safe code |downcast is rejected in ||@safe code OS/Version|Mac OS X|All --- Comment #2 from yebblies yebbl...@gmail.com 2011-07-15 00:16:42 EST --- https://github.com/D-Programming-Language/dmd/pull/252 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6014] rt_finalize Segmentation fault , dmd 2.053 on linux freebsd
http://d.puremagic.com/issues/show_bug.cgi?id=6014 --- Comment #7 from changlon chang...@gmail.com 2011-07-14 07:40:42 PDT --- Hi Steven Schveighoffer , I import core.runtime, but the stack trace is not auto printed . Can you tell how to print the stack trace ? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6317] ICE on struct literal of nested struct
http://d.puremagic.com/issues/show_bug.cgi?id=6317 yebblies yebbl...@gmail.com changed: What|Removed |Added Keywords||ice-on-valid-code CC||yebbl...@gmail.com Platform|x86 |All Summary|A inner struct with member |ICE on struct literal of |function causes a compiler |nested struct |internal error | OS/Version|Windows |All Severity|normal |critical --- Comment #1 from yebblies yebbl...@gmail.com 2011-07-15 00:44:22 EST --- This fails for both kinds of struct initializers, Struct(...) and {...}. Workaround is to use a static struct and pass the context as needed. Thanks for reducing this! -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6317] ICE on struct literal of nested struct
http://d.puremagic.com/issues/show_bug.cgi?id=6317 yebblies yebbl...@gmail.com changed: What|Removed |Added Keywords||patch --- Comment #2 from yebblies yebbl...@gmail.com 2011-07-15 02:13:52 EST --- Even simple workaround - use structname(args) instead of { args }. https://github.com/D-Programming-Language/dmd/pull/253 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6014] rt_finalize Segmentation fault , dmd 2.053 on linux freebsd
http://d.puremagic.com/issues/show_bug.cgi?id=6014 --- Comment #8 from Steven Schveighoffer schvei...@yahoo.com 2011-07-14 09:45:27 PDT --- I meant a stack trace from gdb... use bt I think. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6318] New: module isn't fully processed under weird conditions
http://d.puremagic.com/issues/show_bug.cgi?id=6318 Summary: module isn't fully processed under weird conditions Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: mrmoc...@gmx.de --- Comment #0 from Trass3r mrmoc...@gmx.de 2011-07-14 10:47:22 PDT --- One of the weirdest bugs I've ever encountered. Set up a directory named 'basic'. Inside there 3 files: module basic.Messages; //import basic.utils; // for flattenNamedEnum pragma(msg, foo); enum Severity { NOTE, } pragma(msg, flattenNamedEnum!Severity); pragma(msg, bar); // definition of enum Msg is normally mixed in here module basic.Bar; import basic.Handle; import basic.Messages; class Bar { public: enum Level { Ignored, } void bla(Msg msg) { } } module basic.Handle; import basic.Bar; void foo(Bar.Level level) { } I compiled it from inside the folder with 'dmd -c -I.. Bar.d Handle.d' Bar.d(13): Error: undefined identifier Msg foo Note how basic.Messages is only evaluated to a certain degree. The same happens with dmd -c -I.. Bar.d Handle.d Messages.d dmd -c -I.. Bar.d Messages.d Handle.d Only with 'dmd -c -I.. Handle.d Bar.d' it yields foo ../basic/Messages.d(14): Error: template instance template 'flattenNamedEnum' is not defined __error bar Bar.d(16): Error: undefined identifier Msg And with 'dmd -c -I.. Messages.d Bar.d Handle.d': foo Messages.d(14): Error: template instance template 'flattenNamedEnum' is not defined __error bar Bar.d(16): Error: undefined identifier Msg Also note that adding the definition of Msg by hand like enum Msg { f } or commenting out the flattenNamedEnum mixin also shows similar results. Can anyone confirm this? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6310] Missing template instantiation traceback when an error happens in the template parameter of an alias.
http://d.puremagic.com/issues/show_bug.cgi?id=6310 --- Comment #2 from kenn...@gmail.com 2011-07-14 13:36:08 PDT --- 4 more test cases: replace the contents of RT!(...) in the two comments by '[T.init, T.init]' and 'void'. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6318] module isn't fully processed under weird conditions
http://d.puremagic.com/issues/show_bug.cgi?id=6318 --- Comment #1 from Trass3r mrmoc...@gmx.de 2011-07-14 16:09:47 PDT --- Well, if ever needed, here's basic.utils: //! bring named enum members into current scope string flattenNamedEnum(EnumType)() if (is (EnumType == enum)) { string s = ; foreach (i, e; __traits(allMembers, EnumType)) { s ~= alias ~ EnumType.stringof ~ . ~ __traits(allMembers, EnumType)[i] ~ ~ __traits(allMembers, EnumType)[i] ~ ;\n; } return s; } Pulling enum Level out of Bar also seems to 'resolve' this. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6319] New: Problem with prinft inside debug{} of pure function
http://d.puremagic.com/issues/show_bug.cgi?id=6319 Summary: Problem with prinft inside debug{} of pure function Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2011-07-14 17:14:15 PDT --- A D2 program: import core.stdc.stdio; void foo() pure { debug { if(true) printf(); } } void main() { foo(); } If I compile it with -debug I DMD 2.054 it shows: test.d(5): Error: pure function 'foo' cannot call impure function 'printf' If I remove the if(true) line the program compiles and runs correctly: import core.stdc.stdio; void foo() pure { debug { printf(); } } void main() { foo(); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5250] Pure std.typecons.Tuple
http://d.puremagic.com/issues/show_bug.cgi?id=5250 bearophile_h...@eml.cc changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #2 from bearophile_h...@eml.cc 2011-07-14 17:30:20 PDT --- Yay, fixed in DMD 2.054. Pure Tuples are useful in functional-style programming. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6319] Problem with prinft inside debug{} of pure function
http://d.puremagic.com/issues/show_bug.cgi?id=6319 --- Comment #1 from bearophile_h...@eml.cc 2011-07-14 17:52:52 PDT --- Until this bug gets fixed, a simple workaround is to just put the if() outside the debug{}: import core.stdc.stdio; void foo() pure { if(true) debug { printf(); } } void main() { foo(); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6319] Problem with prinft inside debug{} of pure function
http://d.puremagic.com/issues/show_bug.cgi?id=6319 changlon chang...@gmail.com changed: What|Removed |Added CC||chang...@gmail.com --- Comment #2 from changlon chang...@gmail.com 2011-07-14 18:10:31 PDT --- Starting program: /web/www/tmp/jade/jade2test [Thread debugging using libthread_db enabled] f = 0x4fc4b0,32, t = 0x713030,32, size = 1 f = 0x4fed20,176, t = 0x77ed5f00,176, size = 1 f = 0x4ff200,72, t = 0x71f490,72, size = 1 f = 0x4f8c10,64, t = 0x77ed8fc0,64, size = 1 f = 0x4f8d00,64, t = 0x77ed8f80,64, size = 1 f = 0x4f0880,12, t = 0x77ed9ff0,12, size = 1 f = 0x4f3920,56, t = 0x77ed8f00,56, size = 1 f = 0x4f3920,56, t = 0x77ed8ec0,56, size = 1 1 times use time = 1ms Program received signal SIGSEGV, Segmentation fault. 0x004cda08 in rt.lifetime.rt_finalize (p=0x7729d000, det=false) at src/rt/lifetime.d:1154 1154ClassInfo c = **pc; (gdb) bt #0 0x004cda08 in rt.lifetime.rt_finalize (p=0x7729d000, det=false) at src/rt/lifetime.d:1154 #1 0x004cb1de in gc.gcx.Gcx.fullcollect (this=0x713060, stackTop=0x7fffe260) at src/gc/gcx.d:2631 #2 0x004caaf3 in gc.gcx.Gcx.fullcollectshell (this=0x713060) at src/gc/gcx.d:2391 #3 0x004c902b in gc.gcx.GC.fullCollectNoStack (this=0x713030) at src/gc/gcx.d:1329 #4 0x004c721d in gc.gc.gc_term () at src/gc/gc.d:133 #5 0x004abc4d in rt.dmain2.main.runAll (this=0x7fffe4a0) at src/rt/dmain2.d:515 #6 0x004ab6f5 in rt.dmain2.main.tryExec (this=0x7fffe4a0, dg=0x004abbdc7fffe4a0) at src/rt/dmain2.d:471 #7 0x004ab684 in rt.dmain2.main (argc=1, argv=0x7fffe588) at src/rt/dmain2.d:518 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6319] Problem with prinft inside debug{} of pure function
http://d.puremagic.com/issues/show_bug.cgi?id=6319 --- Comment #3 from changlon chang...@gmail.com 2011-07-14 18:11:45 PDT --- (In reply to comment #2) Starting program: /web/www/tmp/jade/jade2test [Thread debugging using libthread_db enabled] f = 0x4fc4b0,32, t = 0x713030,32, size = 1 f = 0x4fed20,176, t = 0x77ed5f00,176, size = 1 f = 0x4ff200,72, t = 0x71f490,72, size = 1 f = 0x4f8c10,64, t = 0x77ed8fc0,64, size = 1 f = 0x4f8d00,64, t = 0x77ed8f80,64, size = 1 f = 0x4f0880,12, t = 0x77ed9ff0,12, size = 1 f = 0x4f3920,56, t = 0x77ed8f00,56, size = 1 f = 0x4f3920,56, t = 0x77ed8ec0,56, size = 1 1 times use time = 1ms Program received signal SIGSEGV, Segmentation fault. 0x004cda08 in rt.lifetime.rt_finalize (p=0x7729d000, det=false) at src/rt/lifetime.d:1154 1154ClassInfo c = **pc; (gdb) bt #0 0x004cda08 in rt.lifetime.rt_finalize (p=0x7729d000, det=false) at src/rt/lifetime.d:1154 #1 0x004cb1de in gc.gcx.Gcx.fullcollect (this=0x713060, stackTop=0x7fffe260) at src/gc/gcx.d:2631 #2 0x004caaf3 in gc.gcx.Gcx.fullcollectshell (this=0x713060) at src/gc/gcx.d:2391 #3 0x004c902b in gc.gcx.GC.fullCollectNoStack (this=0x713030) at src/gc/gcx.d:1329 #4 0x004c721d in gc.gc.gc_term () at src/gc/gc.d:133 #5 0x004abc4d in rt.dmain2.main.runAll (this=0x7fffe4a0) at src/rt/dmain2.d:515 #6 0x004ab6f5 in rt.dmain2.main.tryExec (this=0x7fffe4a0, dg=0x004abbdc7fffe4a0) at src/rt/dmain2.d:471 #7 0x004ab684 in rt.dmain2.main (argc=1, argv=0x7fffe588) at src/rt/dmain2.d:518 sorry for my mistake, this is for bug 6014 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6014] rt_finalize Segmentation fault , dmd 2.053 on linux freebsd
http://d.puremagic.com/issues/show_bug.cgi?id=6014 --- Comment #9 from changlon chang...@gmail.com 2011-07-14 18:12:04 PDT --- Starting program: /web/www/tmp/jade/jade2test [Thread debugging using libthread_db enabled] f = 0x4fc4b0,32, t = 0x713030,32, size = 1 f = 0x4fed20,176, t = 0x77ed5f00,176, size = 1 f = 0x4ff200,72, t = 0x71f490,72, size = 1 f = 0x4f8c10,64, t = 0x77ed8fc0,64, size = 1 f = 0x4f8d00,64, t = 0x77ed8f80,64, size = 1 f = 0x4f0880,12, t = 0x77ed9ff0,12, size = 1 f = 0x4f3920,56, t = 0x77ed8f00,56, size = 1 f = 0x4f3920,56, t = 0x77ed8ec0,56, size = 1 1 times use time = 1ms Program received signal SIGSEGV, Segmentation fault. 0x004cda08 in rt.lifetime.rt_finalize (p=0x7729d000, det=false) at src/rt/lifetime.d:1154 1154ClassInfo c = **pc; (gdb) bt #0 0x004cda08 in rt.lifetime.rt_finalize (p=0x7729d000, det=false) at src/rt/lifetime.d:1154 #1 0x004cb1de in gc.gcx.Gcx.fullcollect (this=0x713060, stackTop=0x7fffe260) at src/gc/gcx.d:2631 #2 0x004caaf3 in gc.gcx.Gcx.fullcollectshell (this=0x713060) at src/gc/gcx.d:2391 #3 0x004c902b in gc.gcx.GC.fullCollectNoStack (this=0x713030) at src/gc/gcx.d:1329 #4 0x004c721d in gc.gc.gc_term () at src/gc/gc.d:133 #5 0x004abc4d in rt.dmain2.main.runAll (this=0x7fffe4a0) at src/rt/dmain2.d:515 #6 0x004ab6f5 in rt.dmain2.main.tryExec (this=0x7fffe4a0, dg=0x004abbdc7fffe4a0) at src/rt/dmain2.d:471 #7 0x004ab684 in rt.dmain2.main (argc=1, argv=0x7fffe588) at src/rt/dmain2.d:518 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5798] Weakly pure function calls skipped inside a comma expression
http://d.puremagic.com/issues/show_bug.cgi?id=5798 yebblies yebbl...@gmail.com changed: What|Removed |Added Status|REOPENED|RESOLVED CC||yebbl...@gmail.com Resolution||FIXED --- Comment #8 from yebblies yebbl...@gmail.com 2011-07-15 14:07:52 EST --- These all seem to be working with dmd 2.054 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6320] New: non-pure constructor can be called using new
http://d.puremagic.com/issues/show_bug.cgi?id=6320 Summary: non-pure constructor can be called using new Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: yebbl...@gmail.com --- Comment #0 from yebblies yebbl...@gmail.com 2011-07-15 14:18:34 EST --- The following compiles without error in dmd 2.054 class A { this () { static int notpure; notpure++; } } pure void main() { auto x = new A(); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3557] Struct constructors cannot be declared as pure
http://d.puremagic.com/issues/show_bug.cgi?id=3557 yebblies yebbl...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||yebbl...@gmail.com Resolution||FIXED --- Comment #5 from yebblies yebbl...@gmail.com 2011-07-15 14:19:25 EST --- Marking constructors as pure works in current dmd (2.054). I've put the other case as Issue 6320 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---