Another shared bug?
Johannes Pfau
spam at example.com
Tue Nov 2 11:34:09 PDT 2010
I did some experiments using shared and I came across this problem:
---------------------------------------------------------------------
struct Test
{
void test() {}
shared void test2()
{
(cast(Test)this).test();
}
void opCall() {}
}
void main()
{
shared Test t;
t.test2();
}
---------------------------------------------------------------------
DMD output:
test3.d(7): Error: function test3.Test.opCall () is not callable using
argument types (shared(Test)) shared
test3.d(7): Error: expected 0 arguments, not 1 for non-variadic function
type void()
test3.d(7): Error: no property 'test' for type 'void'
Why does dmd think I want to call the opCall in line 7? Is this yet another
bug introduced by the old property behavior?
--
Johannes Pfau
More information about the Digitalmars-d-learn
mailing list