[Issue 10544] writeln!(inout(int)) does not work
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Mon Jul  8 03:19:56 PDT 2013
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=10544
gerleim <gerleim2 at gmail.com> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gerleim2 at gmail.com
--- Comment #3 from gerleim <gerleim2 at gmail.com> 2013-07-08 03:19:54 PDT ---
Sorry if I am writing something silly, it's been a while ago I programed in D,
it seems I skipped the whole inout thing.
Feel free to modify/delete my comment or create new issue as you see fit.
Isn't there a similar problem with Unsigned(T)? Something like
unittest
{
    alias Unsigned!(inout(int)) U4;
    static assert(is(U4 == inout(uint)));
}
What I get with Unqual (with the original writln issue) is that there is a
problem with Unqual!(Unsigned!T), while Unqual!(T) does compile.
In code:
module main;
import std.traits;
int main(string[] argv)
{
    const int x = 1;
    //TestCallGood(x);
    TestCallBad(x);
    return 0;
}
/*public void TestCallGood(int value)
{
    Foo(value);
}*/
public void TestCallBad(inout int value)
{
    Foo(value);
}
public void Foo(T)(T value)
{
    Unsigned!T z;    //Unsigned!(inout(int)) is used as a type
    Unqual!(Unsigned!T) vBad = value;    //template instance
Unqual!(__T4ImplTNgiZ) does not match template declaration Unqual(T)
    Unqual!(T) vGood = value;
}
-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
    
    
More information about the Digitalmars-d-bugs
mailing list