[Issue 8983] New: Overload introduced behind mixin template can't be called from another overload
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Nov 8 14:24:27 PST 2012
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: nobody at puremagic.com
ReportedBy: turkeyman at gmail.com
--- Comment #0 from Manu <turkeyman at gmail.com> 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: -------
More information about the Digitalmars-d-bugs
mailing list