[Issue 5200] New: Call to immutable method during immutable construction
http://d.puremagic.com/issues/show_bug.cgi?id=5200 Summary: Call to immutable method during immutable construction Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: minor Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: jens.k.muel...@gmx.de --- Comment #0 from jens.k.muel...@gmx.de 2010-11-11 01:39:13 PST --- According to TDPL p. 294 a call to any non-static method in an immutable constructor is not allowed. But class A { int a; this() immutable { a = 5; fun(); // should not compile } void fun() immutable {} } compiles with dmd v2.050. I think the behavior should be clarified. Either in dmd to match TDPL or the other way round. I'm going to add a link to a thread on digitalmar...@puremagic.com for further information. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5201] New: std.string.indexOf and std.algorithm.indexOf return different things for narrow strings
http://d.puremagic.com/issues/show_bug.cgi?id=5201 Summary: std.string.indexOf and std.algorithm.indexOf return different things for narrow strings Product: D Version: D2 Platform: Other OS/Version: Mac OS X Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: and...@metalanguage.com --- Comment #0 from Andrei Alexandrescu and...@metalanguage.com 2010-11-11 10:56:43 PST --- std.algorithm.indexOf returns logical position because it uses the forward range interface, and std.string.indexOf returns the physical position. This is potentially confusing (the semantics of a program depends on its imports). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5201] std.string.indexOf and std.algorithm.indexOf return different things for narrow strings
http://d.puremagic.com/issues/show_bug.cgi?id=5201 Andrei Alexandrescu and...@metalanguage.com changed: What|Removed |Added Status|NEW |ASSIGNED AssignedTo|nob...@puremagic.com|and...@metalanguage.com -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3512] dchar iteration over string in CTFE fails
http://d.puremagic.com/issues/show_bug.cgi?id=3512 David R�thlisberger da...@rothlis.net changed: What|Removed |Added CC||da...@rothlis.net --- Comment #2 from David R�thlisberger da...@rothlis.net 2010-11-11 11:29:47 PST --- I'm seeing a similar error. dmd 2.050 on OS X. Code: import std.string; void main() { mixin(int ~ tolower(A) ~ ;); } Error: /Users/drothlis/dmd2/osx/bin/../../src/phobos/std/string.d(792): Error: _aApplycd2 cannot be interpreted at compile time, because it has no available source code minimal.d(5): Error: cannot evaluate tolower(A) at compile time -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3512] dchar iteration over string in CTFE fails
http://d.puremagic.com/issues/show_bug.cgi?id=3512 --- Comment #3 from David R�thlisberger da...@rothlis.net 2010-11-11 11:33:52 PST --- (In reply to comment #2) Whereas the original code posted by Bill Baxter compiles successfully. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3512] dchar iteration over string in CTFE fails
http://d.puremagic.com/issues/show_bug.cgi?id=3512 --- Comment #4 from David R�thlisberger da...@rothlis.net 2010-11-11 11:39:12 PST --- (In reply to comment #3) Please ignore comment #3 :) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5202] New: opIndexAssign doesn't work on structs obtained via getters
http://d.puremagic.com/issues/show_bug.cgi?id=5202 Summary: opIndexAssign doesn't work on structs obtained via getters Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: dsim...@yahoo.com --- Comment #0 from David Simcha dsim...@yahoo.com 2010-11-11 12:05:54 PST --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5202] opIndexAssign doesn't work on structs obtained via getters
http://d.puremagic.com/issues/show_bug.cgi?id=5202 David Simcha dsim...@yahoo.com changed: What|Removed |Added Keywords||rejects-valid --- Comment #1 from David Simcha dsim...@yahoo.com 2010-11-11 12:07:32 PST --- Argh, accidentally hit enter. Please disregard the blank first post. struct OpIndexAssign { void opIndexAssign(uint val, uint index) {} uint opIndex(uint index) { return 42; } } struct Struct { OpIndexAssign oas; OpIndexAssign getter() @property { return oas; } } void main() { Struct s; s.oas[5] = 5; // Works s.getter[5] = 5; // Fails } Error message: test.d(17): Error: s.getter()[5u] is not an lvalue -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5148] Incorrect C++ mangling of multiple const char* parameters
http://d.puremagic.com/issues/show_bug.cgi?id=5148 --- Comment #3 from Lukasz Wrzosek luk.wrzo...@gmail.com 2010-11-11 12:52:29 PST --- Created an attachment (id=806) Fix for bug 5148 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5203] New: dinstaller.exe v2.050 doesn't install anything
http://d.puremagic.com/issues/show_bug.cgi?id=5203 Summary: dinstaller.exe v2.050 doesn't install anything Product: D Version: D1 D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: websites AssignedTo: nob...@puremagic.com ReportedBy: mail4go...@web.de --- Comment #0 from Matthias Pleh mail4go...@web.de 2010-11-11 13:00:31 PST --- the dinstaller.exe from the downloadpage doesn't work anymore (version 2.050) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5204] New: Inherited out contract requires lvalue result?
http://d.puremagic.com/issues/show_bug.cgi?id=5204 Summary: Inherited out contract requires lvalue result? Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: ah0801...@yahoo.com --- Comment #0 from Austin Hastings ah0801...@yahoo.com 2010-11-11 16:04:09 PST --- Using 2049, this code: == module scratch; interface collection( ValueT ) { alias collection!( ValueT ) collection_t; collection_t clear() out( result ) { assert( result.length == 0 ); } @property size_t length(); } interface mapping( KeyT, ValueT ) : collection!( ValueT ) { /* ... */ } class aamap( KeyT, ValueT ) : mapping!( KeyT, ValueT ) { alias aamap!( KeyT, ValueT ) aamap_t; aamap_t clear( ) { return this; } } void main() { alias aamap!( string, int ) aa_str2int; } == produces these diagnostics: == $ dmd -run scratch.d scratch.d(15): Error: cast(collection)__result is not an lvalue scratch.d(19): Error: template instance scratch.aamap!(string,int) error instantiating == As I understand it, I should be able to code a function like int foo() { return 1+1;} and have an out contract attached. So I don't understand why there is any consideration of the result ever being an lvalue. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5148] Incorrect C++ mangling of multiple const char* parameters
http://d.puremagic.com/issues/show_bug.cgi?id=5148 Iain Buclaw ibuc...@ubuntu.com changed: What|Removed |Added CC||ibuc...@ubuntu.com --- Comment #4 from Iain Buclaw ibuc...@ubuntu.com 2010-11-11 16:26:28 PST --- That's not really a proper fix. Yes, it works for this original example in this report, however it doesn't pass this test: extern (C++) void bug5148a(char*, char*, char*, char*); extern (C++) void bug5148b(char*, char*, char*, const char*); extern (C++) void bug5148c(char*, char*, const char*, char*); extern (C++) void bug5148d(char*, char*, const char*, const char*); extern (C++) void bug5148e(char*, const char*, char*, char*); extern (C++) void bug5148f(char*, const char*, char*, const char*); extern (C++) void bug5148g(char*, const char*, const char*, char*); extern (C++) void bug5148h(char*, const char*, const char*, const char*); extern (C++) void bug5148i(const char*, char*, char*, char*); extern (C++) void bug5148j(const char*, char*, char*, const char*); extern (C++) void bug5148k(const char*, char*, const char*, char*); extern (C++) void bug5148l(const char*, char*, const char*, const char*); extern (C++) void bug5148m(const char*, const char*, char*, char*); extern (C++) void bug5148n(const char*, const char*, char*, const char*); extern (C++) void bug5148o(const char*, const char*, const char*, char*); extern (C++) void bug5148p(const char*, const char*, const char*, const char*); Regards -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5204] Inherited out contract requires lvalue result?
http://d.puremagic.com/issues/show_bug.cgi?id=5204 bearophile_h...@eml.cc changed: What|Removed |Added CC||bearophile_h...@eml.cc --- Comment #1 from bearophile_h...@eml.cc 2010-11-11 17:20:30 PST --- This may be a reduced test case: interface IFoo { IFoo bar() out {} } class Foo : IFoo { Foo bar() { return null; } } void main() {} -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2954] [tdpl] Appalling bug in associative arrays (D2 only)
http://d.puremagic.com/issues/show_bug.cgi?id=2954 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added CC||bugzi...@digitalmars.com --- Comment #2 from Walter Bright bugzi...@digitalmars.com 2010-11-11 17:56:01 PST --- http://www.dsource.org/projects/dmd/changeset/749 This fixes Andrei's bug, but Don's is a different bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4529] Segfault(typinf.c) involving typeid(typeof(functionName))
http://d.puremagic.com/issues/show_bug.cgi?id=4529 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED --- Comment #3 from Walter Bright bugzi...@digitalmars.com 2010-11-11 19:01:16 PST --- http://www.dsource.org/projects/dmd/changeset/750 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5205] New: D runtime duplication in zip
http://d.puremagic.com/issues/show_bug.cgi?id=5205 Summary: D runtime duplication in zip Product: D Version: D2 Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: jesse.k.phillip...@gmail.com CC: jesse.k.phillip...@gmail.com --- Comment #0 from Jesse Phillips jesse.k.phillip...@gmail.com 2010-11-11 19:16:02 PST --- The zip file distributed for DMD includes the source code for druntime. There is actually an old version of the code lingering in the import section, which now also contains generated interface files. dmd may be preferring the .d files over .di causing old code to be used. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4728] Segfault(toctype.c) by protected/private constructor in an other module
http://d.puremagic.com/issues/show_bug.cgi?id=4728 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED --- Comment #4 from Walter Bright bugzi...@digitalmars.com 2010-11-11 19:26:20 PST --- http://www.dsource.org/projects/dmd/changeset/751 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5206] New: stat_t is not the same as struct stat
http://d.puremagic.com/issues/show_bug.cgi?id=5206 Summary: stat_t is not the same as struct stat Product: D Version: D2 Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: jesse.k.phillip...@gmail.com CC: jesse.k.phillip...@gmail.com --- Comment #0 from Jesse Phillips jesse.k.phillip...@gmail.com 2010-11-11 21:34:53 PST --- The structure created by D for stat is not the same size as the one in C, and there appears to be no communication of data between C and D. Assigns a value to st_mode and calls a C function which prints the value and assigns its own. At which point D prints the value (the same one it assigned). Running 32bit Linux. Output: D size: 100 D Assigning 65 C Size: 88 C Found: 0 C Assign: 45 D Found 65 import core.sys.posix.sys.stat; import std.stdio; extern(C) void modStat(stat_t* data); void main() { stat_t stbuf; writeln(D size: , stbuf.sizeof); writeln(D Assigning , 65); stbuf.st_mode = 65; modStat(stbuf); writeln(D Found , stbuf.st_mode); } --- cstat.c #include sys/stat.h #include stdio.h void modStat(struct stat *stbuf) { struct stat rrr; printf(C Size: %d\n, sizeof(rrr)); printf(C Found: %d\n, stbuf-st_mode); printf(C Assign: %d\n, 45); stbuf-st_mode = 45; } Compiled with: gcc -g -c cstat.c dmd -gc stat.d cstat.o -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5206] stat_t is not the same as struct stat
http://d.puremagic.com/issues/show_bug.cgi?id=5206 --- Comment #1 from Jesse Phillips jesse.k.phillip...@gmail.com 2010-11-11 21:48:11 PST --- I did try to compare the Structures, and only one thing came out as being different (after I discovered __USE_FILE_OFFSET64 was supposed to always be set). The struct has a if(false) which seems to have the missing code that I need, and adds quite a bit. http://dsource.org/projects/druntime/browser/trunk/src/core/sys/posix/sys/stat.d?rev=300#L112 This is what stat looks like with some trimming: gcc -E -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -pthread -lfuse -lrt -ldl stat.h struct stat { __dev_t st_dev; unsigned short int __pad1; __ino_t __st_ino; __mode_t st_mode; __nlink_t st_nlink; __uid_t st_uid; __gid_t st_gid; __dev_t st_rdev; unsigned short int __pad2; __off64_t st_size; __blksize_t st_blksize; __blkcnt64_t st_blocks; struct timespec st_atim; struct timespec st_mtim; struct timespec st_ctim; __ino64_t st_ino; }; -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---