[Issue 6930] combined type of immutable(T) and inout(T) should be inout(const(T))

2013-12-21 Thread d-bugmail
/2c0ead859f208d80190d4e634b5a0737d4b64645 fix Issue 6930 - combined type of immutable(T) and inout(T) should be inout(const(T)) https://github.com/D-Programming-Language/dmd/commit/6f4866b5b07094861c55f20165496019683242ef Merge pull request #2992 from 9rnsr/fix6930 [enh] Issue 6930 - combined type of immutable(T) and inout(T

[Issue 6930] combined type of immutable(T) and inout(T) should be inout(const(T))

2013-12-21 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=6930 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 6930] combined type of immutable(T) and inout(T) should be inout(const(T))

2013-12-19 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=6930 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #19

[Issue 6930] combined type of immutable(T) and inout(T) should be inout(const(T))

2013-12-09 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=6930 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Depends on||11711 --- Comment

[Issue 6930] combined type of immutable(T) and inout(T) should be inout(const(T))

2011-12-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6930 --- Comment #16 from timon.g...@gmx.ch 2011-12-05 03:13:43 PST --- Thank you for taking the time to implement this! I think the issue you ran into is issue 6809. Once issue 6809 is fixed, the code should compile again. in inout(C) -

[Issue 6930] combined type of immutable(T) and inout(T) should be inout(const(T))

2011-12-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6930 --- Comment #17 from Steven Schveighoffer schvei...@yahoo.com 2011-12-05 07:02:52 PST --- I need to re-reason this enhancement through in order to give an informed opinion, it's complex :) But issue 6809 needs to be fixed regardless. What if

[Issue 6930] combined type of immutable(T) and inout(T) should be inout(const(T))

2011-12-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6930 --- Comment #15 from Kenji Hara k.hara...@gmail.com 2011-12-04 21:37:31 PST --- While implementing this enhancement, I've found an issue. Following code now can compile, but introducing inout(const(T)) breaks it. bool hasDrive(C)(in C[] path)

[Issue 6930] combined type of immutable(T) and inout(T) should be inout(const(T))

2011-11-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6930 Steven Schveighoffer schvei...@yahoo.com changed: What|Removed |Added CC|

[Issue 6930] combined type of immutable(T) and inout(T) should be inout(const(T))

2011-11-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6930 --- Comment #2 from timon.g...@gmx.ch 2011-11-10 11:16:41 PST --- (In reply to comment #1) I'm not seeing a good use case here. Can't you just do: return condition ? x : new inout(int[])(2); Is this better? immutable(int[]) bar(){

[Issue 6930] combined type of immutable(T) and inout(T) should be inout(const(T))

2011-11-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6930 Steven Schveighoffer schvei...@yahoo.com changed: What|Removed |Added CC|

[Issue 6930] combined type of immutable(T) and inout(T) should be inout(const(T))

2011-11-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6930 --- Comment #4 from timon.g...@gmx.ch 2011-11-10 11:42:45 PST --- (In reply to comment #3) So let my try to understand what inout(const(T)) actually means. If inout resolves to mutable or const, this becomes const(T) If inout resolves to

[Issue 6930] combined type of immutable(T) and inout(T) should be inout(const(T))

2011-11-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6930 --- Comment #5 from Kenji Hara k.hara...@gmail.com 2011-11-10 11:59:36 PST --- (In reply to comment #0) inout(const(int[])) foo(inout(int[]) x){ import std.random; bool condition = cast(bool)uniform(0,2); return condition ? x :

[Issue 6930] combined type of immutable(T) and inout(T) should be inout(const(T))

2011-11-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6930 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Severity|normal |enhancement ---

[Issue 6930] combined type of immutable(T) and inout(T) should be inout(const(T))

2011-11-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6930 --- Comment #7 from Steven Schveighoffer schvei...@yahoo.com 2011-11-10 12:38:04 PST --- What it does is allow you to return data that is immutable, but is not part of the input, and still have it be immutable after inout is resolved. The

[Issue 6930] combined type of immutable(T) and inout(T) should be inout(const(T))

2011-11-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6930 --- Comment #8 from timon.g...@gmx.ch 2011-11-10 12:39:59 PST --- (In reply to comment #6) I think this issue is an enhancement. I strongly disagree. What qualifies it as an enhancement for you? With current dmd implementation, the result

[Issue 6930] combined type of immutable(T) and inout(T) should be inout(const(T))

2011-11-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6930 --- Comment #9 from Steven Schveighoffer schvei...@yahoo.com 2011-11-10 12:50:44 PST --- (In reply to comment #8) (In reply to comment #6) I think this issue is an enhancement. I strongly disagree. What qualifies it as an enhancement for

[Issue 6930] combined type of immutable(T) and inout(T) should be inout(const(T))

2011-11-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6930 --- Comment #10 from timon.g...@gmx.ch 2011-11-10 13:12:29 PST --- (In reply to comment #9) (In reply to comment #8) (In reply to comment #6) I think this issue is an enhancement. I strongly disagree. What qualifies it as an

[Issue 6930] combined type of immutable(T) and inout(T) should be inout(const(T))

2011-11-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6930 --- Comment #11 from Steven Schveighoffer schvei...@yahoo.com 2011-11-10 13:22:28 PST --- (In reply to comment #10) (In reply to comment #9) inout's primary focus is transferring the type modifier from the arguments to the return type.

[Issue 6930] combined type of immutable(T) and inout(T) should be inout(const(T))

2011-11-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6930 --- Comment #12 from timon.g...@gmx.ch 2011-11-10 13:33:33 PST --- (In reply to comment #11) (In reply to comment #10) (In reply to comment #9) inout's primary focus is transferring the type modifier from the arguments to the

[Issue 6930] combined type of immutable(T) and inout(T) should be inout(const(T))

2011-11-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6930 --- Comment #13 from Steven Schveighoffer schvei...@yahoo.com 2011-11-10 13:41:52 PST --- (In reply to comment #12) (In reply to comment #11) You may be misunderstanding me. I agree this is a bug. I'll try to be clearer: 1.

[Issue 6930] combined type of immutable(T) and inout(T) should be inout(const(T))

2011-11-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6930 --- Comment #14 from timon.g...@gmx.ch 2011-11-10 13:58:05 PST --- (In reply to comment #13) (In reply to comment #12) (In reply to comment #11) You may be misunderstanding me. I agree this is a bug. I'll try to be clearer: 1.