http://d.puremagic.com/issues/show_bug.cgi?id=8983

           Summary: Overload introduced behind mixin template can't be
                    called from another overload
           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 Manu <[email protected]> 2012-11-08 14:24:24 PST ---
http://dpaste.dzfl.pl/f955d02a

test(int) can't call the overload text(int, float) introduced behind the mixin
template.
If you paste that mixin directly (remove the mixin template) it works.

Again here:

mixin template MixOverload()
{
    mixin( "int test(int x, float y) { return x + cast(int)y; }" );
}

struct Test
{
    mixin MixOverload; // <- introduce an overload for test()


    void test(int x)
    {
        test(x, 1);    // call the overload defined in the mixin
    }
}

Output:

/home/c950/c254.d(13): Error: function c254.Test.test (int x) is not callable
using argument types (int,int)
/home/c950/c254.d(13): Error: function c254.Test.test (int x) is not callable
using argument types (int,int)
/home/c950/c254.d(13): Error: expected 1 arguments, not 2 for non-variadic
function type void(int x)

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

Reply via email to