https://d.puremagic.com/issues/show_bug.cgi?id=11632

           Summary: Old alias syntax accepts "ref"
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Dicebot <[email protected]> 2013-11-28 07:29:22 PST ---
When using old alias form, `ref` is both accepted and not making any effect:

-----------
alias ref int RefInt;

void foo(RefInt x)
{
    x = 42;
}

void main()
{
    int x;
    foo(x);

    import std.stdio : writeln;
    writeln(x);
}
-----------
0
-----------

`alias RefInt = ref int` is rejected with "Error: basic type expected, not ref"
so I assume it should be the same here.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to