On 10/1/11, bearophile wrote:
> I think it didn't perform a conversion, it just used to produce wrong code.
Yes, poor wording on my part.
> Is this in Bugzilla already?
I can't recall. Doesn't hurt to file it if you can't find it.
On 10/01/2011 08:33 AM, Andrej Mitrovic wrote:
> On 10/1/11, Ellery Newcomer wrote:
>> On 09/30/2011 08:20 PM, Andrej Mitrovic wrote:
>>> I think this is a side-effect of the new function pointer fixes, where
>>> you now can't implicitly convert an extern(C) function to an extern(D)
>>> function b
On 10/1/11, Ellery Newcomer wrote:
> On 09/30/2011 08:20 PM, Andrej Mitrovic wrote:
>> I think this is a side-effect of the new function pointer fixes, where
>> you now can't implicitly convert an extern(C) function to an extern(D)
>> function by accident (and that's a good thing). But the problem
> Maybe a new future job for std.conv.to? (to convert a extern(C) func ponter
> to extern(D) func pointer).
This seems useless. Please ignore this.
Bye,
bearophile
Ellery Newcomer:
> weird error. anyone know what's going on?
It's a good error message. In DMD 2.056head gives an even better error message:
test6.d(8): Error: function test6.X.tt (int function(const const(char*)) xz) is
not callable using argument types (extern (C) int function(const const(cha
On 09/30/2011 08:20 PM, Andrej Mitrovic wrote:
> I think this is a side-effect of the new function pointer fixes, where
> you now can't implicitly convert an extern(C) function to an extern(D)
> function by accident (and that's a good thing). But the problem is,
> you can't define a function with a
On 09/30/2011 08:20 PM, Andrej Mitrovic wrote:
> I think this is a side-effect of the new function pointer fixes, where
> you now can't implicitly convert an extern(C) function to an extern(D)
> function by accident (and that's a good thing). But the problem is,
> you can't define a function with a
t; }
> void main(){
> X x = new X();
> x.tt = &puts;
> }
> [ellery@localhost d]$ dmd test
> test.d(8): Error: function test.X.tt (int function(const const(char*))
> xz) is not callable using argument types (int C function(const
> const(char*) s))
> test.d(8):
I think this is a side-effect of the new function pointer fixes, where
you now can't implicitly convert an extern(C) function to an extern(D)
function by accident (and that's a good thing). But the problem is,
you can't define a function with a different linkage type inline as a
type parameter. You
function test.X.tt (int function(const const(char*))
xz) is not callable using argument types (int C function(const
const(char*) s))
test.d(8): Error: cannot implicitly convert expression (& puts) of type
int C function(const const(char*) s) to int function(const const(char*))
10 matches
Mail list logo