https://issues.dlang.org/show_bug.cgi?id=7355
Iain Buclaw changed:
What|Removed |Added
Priority|P2 |P3
--
http://d.puremagic.com/issues/show_bug.cgi?id=7355
--- Comment #12 from timon.g...@gmx.ch 2012-02-03 14:42:21 PST ---
(In reply to comment #11)
(In reply to comment #10)
For example, this should type check:
immutable(int)[] arr = [2,3,4];
inout(const(int))[] foo(inout(int)[] x){
http://d.puremagic.com/issues/show_bug.cgi?id=7355
--- Comment #13 from Steven Schveighoffer schvei...@yahoo.com 2012-02-03
15:46:53 PST ---
Once again you are right Timon!
I was neglecting to see in the original example that the call was id(foo(y))
instead of just id(y)! I sometimes cannot
http://d.puremagic.com/issues/show_bug.cgi?id=7355
--- Comment #14 from Steven Schveighoffer schvei...@yahoo.com 2012-02-03
15:59:19 PST ---
Er... messed up that graph a smidge
(In reply to comment #13)
mutable ---+
|
immutable --+--
http://d.puremagic.com/issues/show_bug.cgi?id=7355
--- Comment #16 from timon.g...@gmx.ch 2012-02-03 16:26:32 PST ---
(In reply to comment #13)
Once again you are right Timon!
I was neglecting to see in the original example that the call was id(foo(y))
instead of just id(y)! I sometimes
http://d.puremagic.com/issues/show_bug.cgi?id=7355
--- Comment #17 from Steven Schveighoffer schvei...@yahoo.com 2012-02-03
16:54:12 PST ---
(In reply to comment #16)
(In reply to comment #13)
Once again you are right Timon!
I was neglecting to see in the original example that the call
http://d.puremagic.com/issues/show_bug.cgi?id=7355
--- Comment #18 from timon.g...@gmx.ch 2012-02-03 17:14:50 PST ---
(In reply to comment #17)
(In reply to comment #16)
(In reply to comment #13)
Once again you are right Timon!
I was neglecting to see in the original example that
http://d.puremagic.com/issues/show_bug.cgi?id=7355
--- Comment #9 from Steven Schveighoffer schvei...@yahoo.com 2012-02-02
12:07:29 PST ---
(In reply to comment #8)
This rule should work satisfactory:
- The compiler is required to resolve inout such that the behavior is as if
there were
http://d.puremagic.com/issues/show_bug.cgi?id=7355
--- Comment #10 from timon.g...@gmx.ch 2012-02-02 13:05:31 PST ---
(In reply to comment #9)
(In reply to comment #8)
This rule should work satisfactory:
- The compiler is required to resolve inout such that the behavior is as if
there
http://d.puremagic.com/issues/show_bug.cgi?id=7355
--- Comment #8 from timon.g...@gmx.ch 2012-01-27 14:44:19 PST ---
This rule should work satisfactory:
- The compiler is required to resolve inout such that the behavior is as if
there were four (five, with inout(const(T)) enhancement in place)
http://d.puremagic.com/issues/show_bug.cgi?id=7355
--- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-01-26 04:30:30 PST ---
My understanding is, each inout deduction from a function argument just like
pattern matching.
Parameter type: inout( int *)*
Argument type:
http://d.puremagic.com/issues/show_bug.cgi?id=7355
Steven Schveighoffer schvei...@yahoo.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=7355
--- Comment #3 from timon.g...@gmx.ch 2012-01-26 09:07:23 PST ---
(In reply to comment #2)
(In reply to comment #1)
My understanding is, each inout deduction from a function argument just like
pattern matching.
Parameter type:
http://d.puremagic.com/issues/show_bug.cgi?id=7355
--- Comment #4 from timon.g...@gmx.ch 2012-01-26 09:20:32 PST ---
(In reply to comment #1)
My understanding is, each inout deduction from a function argument just like
pattern matching.
Parameter type: inout( int *)*
Argument
http://d.puremagic.com/issues/show_bug.cgi?id=7355
--- Comment #5 from Steven Schveighoffer schvei...@yahoo.com 2012-01-26
09:36:01 PST ---
(In reply to comment #3)
The typeof resolves to error because inout resolves to immutable.
As I said, it should fail to match or match mutable and fail
http://d.puremagic.com/issues/show_bug.cgi?id=7355
--- Comment #6 from timon.g...@gmx.ch 2012-01-26 09:55:37 PST ---
(In reply to comment #5)
(In reply to comment #3)
The typeof resolves to error because inout resolves to immutable.
As I said, it should fail to match or match mutable
http://d.puremagic.com/issues/show_bug.cgi?id=7355
--- Comment #7 from Steven Schveighoffer schvei...@yahoo.com 2012-01-26
10:21:28 PST ---
(In reply to comment #6)
(In reply to comment #5)
Let's assume inout
did resolve to const for foo, and the function could be called:
immutable
17 matches
Mail list logo