[Issue 7697] New: Default argument in template method throws AssertError
http://d.puremagic.com/issues/show_bug.cgi?id=7697 Summary: Default argument in template method throws AssertError Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: an...@gmx.net --- Comment #0 from aneas an...@gmx.net 2012-03-13 02:57:06 PDT --- class C { void method(alias F = function(int i) {})() { int i; F(i); } } void main() { C c = new C; c.method!(function(int i) {})(); // works c.method(); // core.exception.AssertError@./bug.d(2): null this } AssertError does not occur with: void method(alias F = function() {})() { int i; F(); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7698] New: can't specialize parameterized template value
http://d.puremagic.com/issues/show_bug.cgi?id=7698 Summary: can't specialize parameterized template value Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: d...@dawgfoto.de --- Comment #0 from d...@dawgfoto.de 2012-03-13 04:13:01 PDT --- cat bug.d CODE template foo(T, T val : 0) { } alias foo!(int, 0) fooi0; CODE dmd -c bug bug.d(2): Error: forward reference to type T bug.d(2): Error: cannot implicitly convert expression (0) of type int to T -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7699] New: Cannot get frame pointer to function when compiling with -inline
http://d.puremagic.com/issues/show_bug.cgi?id=7699 Summary: Cannot get frame pointer to function when compiling with -inline Product: D Version: D1 D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: leandro.lucare...@sociomantic.com --- Comment #0 from Leandro Lucarella leandro.lucare...@sociomantic.com 2012-03-13 04:25:46 PDT --- Reduced testcase: --- module test; class P { void f(int n) in { assert (n); } body { } } class D: P { void f(int n) in { } body { } } --- Error (only when compiling with -inline): --- test.d(5): Error: function test.D.f cannot get frame pointer to f --- Not using -inline makes it compile. Removing the empty in {} contract in D, makes it compile. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7633] Missing CTFE error message
http://d.puremagic.com/issues/show_bug.cgi?id=7633 Don clugd...@yahoo.com.au changed: What|Removed |Added CC||clugd...@yahoo.com.au --- Comment #1 from Don clugd...@yahoo.com.au 2012-03-13 05:11:21 PDT --- https://github.com/D-Programming-Language/dmd/pull/806 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7681] Regression(2.059head):ICE:opCatAssign(delegate) to undefined identifier
http://d.puremagic.com/issues/show_bug.cgi?id=7681 Don clugd...@yahoo.com.au changed: What|Removed |Added CC||clugd...@yahoo.com.au --- Comment #1 from Don clugd...@yahoo.com.au 2012-03-13 05:12:44 PDT --- https://github.com/D-Programming-Language/dmd/pull/805 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7700] New: wrong semantic scope while ordering parameterized specialization
http://d.puremagic.com/issues/show_bug.cgi?id=7700 Summary: wrong semantic scope while ordering parameterized specialization Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: d...@dawgfoto.de --- Comment #0 from d...@dawgfoto.de 2012-03-13 05:14:43 PDT --- cat bug.d CODE template foo(short lo2, short hi2 : lo) {} template foo(byte lo, byte hi : lo) {} alias foo!(0, 0) foo00; CODE dmd -c bug bug.d(2): Error: undefined identifier lo, did you mean variable lo2? Both templates are match with conversion. During ordering the first template is instantiated with foo!(0, lo) and semantic is run in the wrong scope. It seems that we need to create a scope and run semantic while creating the dummy args. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6681] struct constructor call is converted to struct literal that breaks union initialization
http://d.puremagic.com/issues/show_bug.cgi?id=6681 --- Comment #12 from Don clugd...@yahoo.com.au 2012-03-13 05:15:23 PDT --- https://github.com/D-Programming-Language/phobos/pull/493 and then https://github.com/D-Programming-Language/dmd/pull/803 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6681] struct constructor call is converted to struct literal that breaks union initialization
http://d.puremagic.com/issues/show_bug.cgi?id=6681 --- Comment #13 from yebblies yebbl...@gmail.com 2012-03-13 23:32:59 EST --- Thanks for doing this. I think my branch was still letting you return partially uninitialized arrays/structs from ctfe. I also think the following should work: union U { int a, b; } int func() { U u; u.a = 3; assert(u.b == 3); return 1; } static assert(func()); But I don't know how to implement it. (it might not be worth it) Umm, test cases. (some pass, some fail, some pulled out of other test cases in dmd/phobos.) The last one should fail, I doubt it's useful leave a variable partially initialized. /* version(none) { struct S { this(int a, int b) { this.a = b; this.b = a; } union { ulong g; struct { int a; int b; } } } static immutable S s = S(1, 0); extern(C) int printf(const char *, ...); void main() { S s = .s; printf(%d %d %d\n, s.g, s.a, s.b); } } version(none) { union in6_addr { private union _in6_u_t { ubyte[16] u6_addr8; ushort[8] u6_addr16; uint[4] u6_addr32; } _in6_u_t in6_u; ubyte[16] s6_addr8; ushort[8] s6_addr16; uint[4] s6_addr32; alias s6_addr8 s6_addr; } const in6_addr IN6ADDR_ANY = { s6_addr8: [0] }; } version(none) { struct Zadok { char [4] s = void; } int quop() { Zadok pong; pong.s = ['z','x','f', 'g']; return 1; } static assert(quop()==1); static assert(quop()==1); // check for clobbering } //version = testc; version(testc) { union U { int a; int b; } int testxx() { U u; u.a = 7; u.b = 4; assert(u.a == 7); assert(u.b == 4); return 1; } static assert(testxx()); } //version = testb; version(testb) { void fillWithZero(T)(T[] arr) { foreach(ref x; arr) x = 7; } T[4] f(T)() { T[4] stackSpace = void; T[4] x = stackSpace; int y = x[0]; //int z = y + y; fillWithZero(stackSpace[]); return stackSpace; } static assert(f!int() == [7,7,7,7]); } //version = testa; version(testa) { interface SomeInterface { int daz(); float bar(char); int baz(); } interface SomeOtherInterface { int xxx(); } class TheBase : SomeInterface, SomeOtherInterface { int q = 88; int rad = 61; int a = 14; int somebaseclassfunc() { return 28;} int daz() { return 0; } int baz() { return 0; } int xxx() { return 762; } int foo() { return q; } float bar(char c) { return 3.6; } } class SomeClass : TheBase, SomeInterface { int gab = 9; int fab; int a = 17; int b = 23; int foo() { return gab + a; } float bar(char c) { return 2.6; } int something() { return 0; } int daz() { return 0; } int baz() { return 0; } } class Unrelated : TheBase { this(int x) { a = x; } } auto classtest1(int n) { SomeClass c = new SomeClass; assert(c.a == 17); assert(c.q == 88); TheBase d = c; assert(d.a == 14); assert(d.q == 88); if (n==7) { // bad cast -- should fail Unrelated u = cast(Unrelated)d; assert(u is null); } SomeClass e = cast(SomeClass)d; d.q = 35; assert(c.q == 35); assert(c.foo() == 9 + 17); ++c.a; assert(c.foo() == 9 + 18); assert(d.foo() == 9 + 18); d = new TheBase; SomeInterface fc = c; SomeOtherInterface ot = c; assert(fc.bar('x') == 2.6); assert(ot.xxx() == 762); fc = d; ot = d; assert(fc.bar('x') == 3.6); assert(ot.xxx() == 762); Unrelated u2 = new Unrelated(7); assert(u2.a == 7); return 6; } static assert(classtest1(1)); static assert(classtest1(2)); static assert(classtest1(7)); // bug 7154 } //version = testd; version(testd) { struct XY { union { int x, y; } } struct AHolder { XY aa; void a(XY x) { aa = x; } } struct AB { AHolder aHolder; XY b; void a(XY x) { aHolder.a(x); } } struct Main { AB ab; void setB() { ab.b = XY(); } void f() { ab.a(XY.init); setB(); } } } //version = teste; version(teste) { union U { int a; long b; } long test() { U u; u.a = 3; u.b = 8; return u.a + u.b; } static assert(test() == 11); } //version = testf; version(testf)
[Issue 7702] New: opDispatch opCall errors
http://d.puremagic.com/issues/show_bug.cgi?id=7702 Summary: opDispatch opCall errors Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: michal.min...@gmail.com --- Comment #0 from Michal Minich michal.min...@gmail.com 2012-03-13 06:29:49 PDT --- struct S { template opDispatch (string name) { void opCall (T) () @property {} } } struct S3 { auto opCall (T) () @property { struct S4 { void opDispatch (string name) () @property {} } S4 s4; return s4; } } void main () { S s; s.opDispatch!x.opCall!int; // OK s.x.opCall!int; // OK s.opDispatch!(x)!(int); // parse error s.x!int; // infinite loop in dmd S3 s3; s3.opCall!int.opDispatch!(x); // OK s3.opCall!int.x; // OK s3!int.x; // Error: template instance s3!(int) s3 is not a template declaration, it is a variable } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7701] New: Internal error on access of instance fn on nested templated struct type
http://d.puremagic.com/issues/show_bug.cgi?id=7701 Summary: Internal error on access of instance fn on nested templated struct type Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: michal.min...@gmail.com --- Comment #0 from Michal Minich michal.min...@gmail.com 2012-03-13 06:27:48 PDT --- dmd 2.058 struct S { struct S2 (T) { void fn () {} } } void main () { S s; s.S2!int.fn(); // Internal error: e2ir.c 688 } happens only when no other error is in file there should be some error message because fn is not static when fn is static it compiles file as it should -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7700] wrong semantic scope while ordering parameterized specialization
http://d.puremagic.com/issues/show_bug.cgi?id=7700 --- Comment #1 from d...@dawgfoto.de 2012-03-13 06:42:51 PDT --- cat bug.d CODE template foo(short lo2, short hi2 : lo2) {} template foo(byte lo, byte hi : lo) {} alias foo!(0, 0) foo00; CODE dmd -c bug bug.d(4): Error: undefined identifier lo, did you mean variable lo2? bug.d(2): Error: undefined identifier lo2, did you mean variable lo? bug.d(8): Error: template instance foo!(0,0) foo!(0,0) matches more than one template declaration, bug.d(2):foo(short lo2,short hi2 : lo2) and bug.d(4):foo(byte lo,byte hi : lo) There was a typo in the previous code example. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7702] opDispatch opCall errors
http://d.puremagic.com/issues/show_bug.cgi?id=7702 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||ice --- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-03-13 07:30:50 PDT --- The infinite loop in dmd is the real issue. struct S { template opDispatch (string name) { //void opCall (T) () @property {} // not need } } void main () { S s; s.x!int; // infinite loop in dmd } And others are not errors, because their error messages are valid. Then I replace the subject. opCall works only for call syntax, e.g. rewriting foo(args) to foo.opCall(args). If you want to implement s.x!int with opDispatch, *nested opDispatch idiom* like follows would work. struct S { template opDispatch(string name) { T opDispatch(T)() @property { return T.init; } } } void main() { S s; assert(s.x!int == 0); // same as s.opDispatch!(x).opDispatch!(int)() } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7702] opDispatch goes into infinite loop
http://d.puremagic.com/issues/show_bug.cgi?id=7702 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Version|unspecified |D2 Summary|opDispatch opCall errors |opDispatch goes into ||infinite loop Severity|normal |critical -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7509] Allow SIMD variable contents to have all their values changed to a single float variable
http://d.puremagic.com/issues/show_bug.cgi?id=7509 --- Comment #3 from Manu turkey...@gmail.com 2012-03-13 11:40:54 PDT --- Note that as yet, constant's aren't actually properly supported. There are bugs, and the feature is incomplete. Down the track, if you want to use scalar variables, you should be encouraged to load it into a float4 using a the loadFloat(float f) api as far outside your hot code as possible, and use the produced 4x float vector instead. I have a fork with std.simd work in progress if you wanna have a peek: https://github.com/TurkeyMan/phobos/commits/master/std/simd.d Coming together, still a bit to do. This library will be efficient on all architecture, if only a little archaic, but it follows D conventions quite closely. I'd encourage people to build higher level maths libraries ontop of std.simd instead of implementing the hardware abstraction themselves. It'll make libraries a whole lot more portable, ctfe-able, and I expect it'll become very highly tuned with use, which will benefit all maths libs. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7703] New: [UFCS] explicit template function instantiation as property
http://d.puremagic.com/issues/show_bug.cgi?id=7703 Summary: [UFCS] explicit template function instantiation as property 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: k.hanaz...@gmail.com --- Comment #0 from Kasumi Hanazuki k.hanaz...@gmail.com 2012-03-13 15:21:09 PDT --- DMD(2.059HEAD) rejects UFCS with an explicitly instantiated template function called as a property. void f(T)(T a) { } void main() { int x; x.f;// accepted x.f(); // accepted x.f!int;// rejected -- f(x) isn't a template x.f!int(); // accepted } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7648] Can't open file (Windows UTF8)
http://d.puremagic.com/issues/show_bug.cgi?id=7648 --- Comment #3 from Martin Krejcirik m...@krej.cz 2012-03-13 15:27:03 PDT --- (In reply to comment #2) Easy, download attached archive and extract to disk. OK, tried, same error as you reported. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6547] Call to std.algorithm.remove causes compile error
http://d.puremagic.com/issues/show_bug.cgi?id=6547 Tim Keating itsallaboutthe...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #2 from Tim Keating itsallaboutthe...@gmail.com 2012-03-13 15:39:44 PDT --- I will say that I don't agree with this assessment -- the bug isn't really about user error while operating on a narrow string, but about how the compiler library combo respond to that misuse. To wit, anytime a user gets a cryptic error message buried deep inside a library in response to a simple mistake, you have disempowered them from solving their own problem and derailed their momentum in learning the language. That said, under 2.058 the error message is now: test.d(11): Error: cannot implicitly convert expression (start) of type char[] to ulong Which makes it clear that find(string, string) is returning a slice. I think this specific issue should be closed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7704] New: RangeError when using key optainey by AA byKey() iteration
http://d.puremagic.com/issues/show_bug.cgi?id=7704 Summary: RangeError when using key optainey by AA byKey() iteration Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: druntime AssignedTo: nob...@puremagic.com ReportedBy: tob...@pankrath.net --- Comment #0 from Tobias Pankrath tob...@pankrath.net 2012-03-13 16:05:57 PDT --- I get this error: tobias@akela-buntschuh:~/projects/neo$ ./test core.exception.RangeError@test(18): Range violation ./test(_d_array_bounds+0x2a) [0x447c82] ./test() [0x4440c6] ./test(void test.main().int __foreachbody1285(ref immutable(dchar)[])+0x5c) [0x4435a8] ./test(int delegate(int delegate(ref immutable(dchar)[])) object.AssociativeArray!(immutable(dchar)[], int).AssociativeArray.byKey().int foo(int delegate(ref immutable(dchar)[])).int byKeydg(ref immutable(dchar)[], ref int)+0x24) [0x443894] ./test(_aaApply2+0x74) [0x4471e4] ./test(int delegate(int delegate(ref immutable(dchar)[])) object.AssociativeArray!(immutable(dchar)[], int).AssociativeArray.byKey().int foo(int delegate(ref immutable(dchar)[]))+0x54) [0x443868] ./test(_Dmain+0x3c) [0x443540] ./test(extern (C) int rt.dmain2.main(int, char**).void runMain()+0x17) [0x448227] ./test(extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void delegate())+0x2a) [0x447dce] ./test(extern (C) int rt.dmain2.main(int, char**).void runAll()+0x42) [0x44827a] ./test(extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void delegate())+0x2a) [0x447dce] ./test(main+0xd3) [0x447d5f] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7fa6018ca30d] when running the attached program with DMD 2.57 int[dstring] aa; static this() { aa = [ +d : 1, /d : 2, -d : 3, *d : 4 ]; } void main() { foreach(key; aa.byKey()) writeln(aa[key]); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3910] Explicit template instantiations for functions used as array properties?
http://d.puremagic.com/issues/show_bug.cgi?id=3910 Kasumi Hanazuki k.hanaz...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||k.hanaz...@gmail.com Resolution||WORKSFORME --- Comment #1 from Kasumi Hanazuki k.hanaz...@gmail.com 2012-03-13 18:12:12 PDT --- That code now works with dmd 2.059HEAD. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5733] Calling opDispatch As Template Results in Compiler Infinite Loop
http://d.puremagic.com/issues/show_bug.cgi?id=5733 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||ice, pull --- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-03-13 18:35:50 PDT --- https://github.com/D-Programming-Language/dmd/pull/808 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7702] opDispatch goes into infinite loop
http://d.puremagic.com/issues/show_bug.cgi?id=7702 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #2 from Kenji Hara k.hara...@gmail.com 2012-03-13 18:36:04 PDT --- https://github.com/D-Programming-Language/dmd/pull/808 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7705] New: lambda syntax doesn't allow some valid signatures
http://d.puremagic.com/issues/show_bug.cgi?id=7705 Summary: lambda syntax doesn't allow some valid signatures 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: k.hara...@gmail.com --- Comment #0 from Kenji Hara k.hara...@gmail.com 2012-03-13 20:42:46 PDT --- Following code should work as expected. void main() { // lambda has a qualified parameter that needs type inference void foo1(void delegate(ref int ) dg){ int x=10; dg(x); } foo1((ref x){ assert(x == 10); }); // test.d(4): Error: undefined identifier x // Assertion failure: 'typen-deco' on line 1690 in file 'cast.c' // lambda has C style variadic void foo2(void delegate(int, ...) dg){ dg(20, 3.14); } foo2((x,...){ assert(x == 20); }); // OK // lambda has D style type safe variadic void foo3(void delegate(int[]...) dg){ dg(1, 2, 3); } foo3((x ...){ assert(x == [1,2,3]); }); // test.d(16): Error: undefined identifier x // Assertion failure: 'typen-deco' on line 1690 in file 'cast.c' } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7705] lambda syntax doesn't allow some valid signatures
http://d.puremagic.com/issues/show_bug.cgi?id=7705 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-03-13 20:48:27 PDT --- https://github.com/D-Programming-Language/dmd/pull/809 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7135] [tdpl] Multiple delegate-related issues (literal syntax, @system deduction)
http://d.puremagic.com/issues/show_bug.cgi?id=7135 --- Comment #9 from Kenji Hara k.hara...@gmail.com 2012-03-13 20:50:21 PDT --- (In reply to comment #8) Note: Unfortunately, current dmd does not support parameter type inference + type-safe variadisc like follows. //delegate (self, args...) {...} //(self, args...) {...} I've filed bug 7705 to allow such lambda syntax, and posted a pull request to fix it. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7706] New: Comparing struct rvalues
http://d.puremagic.com/issues/show_bug.cgi?id=7706 Summary: Comparing struct rvalues Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: spec Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: k.hanaz...@gmail.com --- Comment #0 from Kasumi Hanazuki k.hanaz...@gmail.com 2012-03-13 21:17:28 PDT --- The spec says in operatoroverloading.dd: | Comparison operations are rewritten as follows: | ``a b'' to ``a.opCmp(b) 0'' or ``b.opCmp(a) 0'' and | If structs declare an opCmp member function, it should follow the following form: | | struct S { | int opCmp(ref const S s) const { ... } | } If you follow these specs, you cannot accept comparison between two rvalues. For example S(0) S(1), which is rewritten as S(0).opCmp(S(1)), is rejected _correctly_ by current DMD implementation (2.059HEAD). In order to resolve this problem, comparison operators on struct types must be translated as follows: a b to (const _tmpb = b), a.opCmp(_tmpb) 0 or (const _tmpa = a), b.opCmp(_tmpa) 0 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7706] Comparing struct rvalues
http://d.puremagic.com/issues/show_bug.cgi?id=7706 --- Comment #1 from Kasumi Hanazuki k.hanaz...@gmail.com 2012-03-13 21:21:44 PDT --- Forgot to mention there is the same problem with opEquals and ==/!=. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7707] New: Purity inference fails when template used before it's defined
http://d.puremagic.com/issues/show_bug.cgi?id=7707 Summary: Purity inference fails when template used before it's defined Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: jmdavisp...@gmx.com --- Comment #0 from Jonathan M Davis jmdavisp...@gmx.com 2012-03-13 21:28:03 PDT --- 2.059 HEAD If you change std.utf.toUTFz to const(wchar)* toUTF16z(C)(const(C)[] str) @system if(isSomeChar!C) { return toUTFz!(const(wchar)*)(str); } unittest { toUTF16z(hello world); } then compilation fails with this error: std/utf.d(1373): Error: pure function 'toUTF16z' cannot call impure function 'toUTFz' std/utf.d(1378): Error: template instance std.utf.toUTF16z!(char) error instantiating make[1]: *** [generated/linux/debug/64/unittest/std/utf] Error 1 make: *** [unittest] Error 2 toUTFz is _not_ marked as pure, and neither is toUTF16z. I don't believe that toUTFz _can_ be pure (certainly, it _shouldn't_ be given what it does), so it should always infer as impure, which would cause toUTF16z be inferred as impure if it's changed to call toUTFz as is done above. However, if you move toUTF16z to after the definition of toUTFz, then it compiles. So, it appears to be a forward declaration issue. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7704] RangeError when using key optainey by AA byKey() iteration
http://d.puremagic.com/issues/show_bug.cgi?id=7704 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --- Comment #1 from hst...@quickfur.ath.cx 2012-03-13 22:09:06 PDT --- This appears to be the same as bug 7512, which has been fixed in git. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7632] byValue() for associative arrays doesn't return the correct values
http://d.puremagic.com/issues/show_bug.cgi?id=7632 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --- Comment #1 from hst...@quickfur.ath.cx 2012-03-13 22:18:01 PDT --- Appears to have been fixed in even more latest git ;-) (2012-03-13). Please verify. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4337] Associative array assignment with dstring keys breaks lookup
http://d.puremagic.com/issues/show_bug.cgi?id=4337 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --- Comment #5 from hst...@quickfur.ath.cx 2012-03-13 22:40:40 PDT --- This bug appears to be the same as bug 7512, which has been fixed in git. Please verify. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---