[Issue 6571] typedefs ignore const, shared, immutable etc modifiers when implicitly converting
http://d.puremagic.com/issues/show_bug.cgi?id=6571 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added CC||bugzi...@digitalmars.com Version|D1 |D2 --- Comment #7 from Walter Bright bugzi...@digitalmars.com 2012-01-20 23:38:39 PST --- First off, this is a D2, not a D1 issue. D -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6571] typedefs ignore const, shared, immutable etc modifiers when implicitly converting
http://d.puremagic.com/issues/show_bug.cgi?id=6571 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WONTFIX --- Comment #8 from Walter Bright bugzi...@digitalmars.com 2012-01-20 23:39:39 PST --- ... continued D1 does not have shared/const, etc. Secondly, typedefs are deprecated in D2. So this is wontfix. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6571] typedefs ignore const, shared, immutable etc modifiers when implicitly converting
http://d.puremagic.com/issues/show_bug.cgi?id=6571 Trass3r mrmoc...@gmx.de changed: What|Removed |Added CC||mrmoc...@gmx.de --- Comment #6 from Trass3r mrmoc...@gmx.de 2011-12-30 06:47:54 PST --- A related issue is if const is part of the typedef. typedef const(void*) type; void bar(void* a) {} void main() { type a; bar(a); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6571] typedefs ignore const, shared, immutable etc modifiers when implicitly converting
http://d.puremagic.com/issues/show_bug.cgi?id=6571 --- Comment #4 from Iain Buclaw ibuc...@ubuntu.com 2011-08-31 15:44:04 PDT --- I don't have windows so I can't test that. ;) Everything is fine on the *nix side of things. For std.encoding, just replace the three 'typedef ubyte' with 'alias ubyte xxx' Regards -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6571] typedefs ignore const, shared, immutable etc modifiers when implicitly converting
http://d.puremagic.com/issues/show_bug.cgi?id=6571 --- Comment #5 from yebblies yebbl...@gmail.com 2011-09-01 15:22:20 EST --- (In reply to comment #4) I don't have windows so I can't test that. ;) Since phobos and druntime don't use typedef any more, there should be no reliance on this bug any more. Would you like to make a pull request? Everything is fine on the *nix side of things. For std.encoding, just replace the three 'typedef ubyte' with 'alias ubyte xxx' This didn't work for me for some reason, I think the module relies on them being distinct types. Using enums instead solved the problem. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6571] typedefs ignore const, shared, immutable etc modifiers when implicitly converting
http://d.puremagic.com/issues/show_bug.cgi?id=6571 Iain Buclaw ibuc...@ubuntu.com changed: What|Removed |Added CC||ibuc...@ubuntu.com --- Comment #1 from Iain Buclaw ibuc...@ubuntu.com 2011-08-29 09:38:19 PDT --- I think this should sort it: MATCH TypeTypedef::constConv(Type *to) { if (equals(to)) return MATCHexact; -if (ty == to-ty sym == ((TypeTypedef *)to)-sym) -return sym-basetype-implicitConvTo(((TypeTypedef *)to)-sym-basetype); +if (ty == to-ty sym == ((TypeTypedef *)to)-sym +MODimplicitConv(mod, to-mod)) +return MATCHconst; return MATCHnomatch; } Regards -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6571] typedefs ignore const, shared, immutable etc modifiers when implicitly converting
http://d.puremagic.com/issues/show_bug.cgi?id=6571 --- Comment #2 from Iain Buclaw ibuc...@ubuntu.com 2011-08-29 09:49:39 PDT --- Patch breaks std.encoding: std/encoding.d:373: Error: cannot implicitly convert expression (s[0u]) of type const(AsciiChar) to AsciiChar std/encoding.d:374: Error: cannot implicitly convert expression (s[0u]) of type const(AsciiChar) to AsciiChar std/encoding.d:380: Error: cannot implicitly convert expression (s[__dollar - 1u]) of type const(AsciiChar) to AsciiChar std/encoding.d:381: Error: cannot implicitly convert expression (s[__dollar - 1u]) of type const(AsciiChar) to AsciiChar Other than that, it is all good to go. :) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6571] typedefs ignore const, shared, immutable etc modifiers when implicitly converting
http://d.puremagic.com/issues/show_bug.cgi?id=6571 --- Comment #3 from yebblies yebbl...@gmail.com 2011-08-30 04:08:03 EST --- It should break std.windows.registry too, that's where I found it. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---