Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
March 07, 2011 Struct constructor and opCall confussion | ||||
---|---|---|---|---|
| ||||
D2 Code: int main(string[] args) { struct S { int i; this(int i) { this.i = i; } void opCall(int x, int y) { } } S s; s(4, 1); return 0; } src\main.d(12): Error: constructor main.main.S.this (int i) is not callable using argument types (int,int) src\main.d(12): Error: expected 1 arguments, not 2 for non-variadic function type ref S(int i) Am I missing something or is this another major bug? T.I.A., Tom; |
March 08, 2011 Re: Struct constructor and opCall confussion | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tom | Tom: > Am I missing something or is this another major bug? A major bug (that is not recognized as major, I think). I don't remember its number in bugzilla, sorry (anyone remembers it?). See also: http://d.puremagic.com/issues/show_bug.cgi?id=4053 Bye, bearophile |
March 08, 2011 Re: Struct constructor and opCall confussion | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile | El 08/03/2011 05:32, bearophile escribió: > Tom: > >> Am I missing something or is this another major bug? > > A major bug (that is not recognized as major, I think). > I don't remember its number in bugzilla, sorry (anyone remembers it?). > > See also: > http://d.puremagic.com/issues/show_bug.cgi?id=4053 > > Bye, > bearophile Think I found it: http://d.puremagic.com/issues/show_bug.cgi?id=4253 This is indeed a major bug. Why not tag it as "major"? I think it's a straight loss of functionality and it happens under almost any circumstance in which one wishes to simply use opCall and a struct... Tom; |
March 08, 2011 Re: Struct constructor and opCall confussion | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tom | On Tue, 08 Mar 2011 10:52:38 -0500, Tom <tom@nospam.com> wrote:
> El 08/03/2011 05:32, bearophile escribió:
>> Tom:
>>
>>> Am I missing something or is this another major bug?
>>
>> A major bug (that is not recognized as major, I think).
>> I don't remember its number in bugzilla, sorry (anyone remembers it?).
>>
>> See also:
>> http://d.puremagic.com/issues/show_bug.cgi?id=4053
>>
>> Bye,
>> bearophile
>
> Think I found it:
>
> http://d.puremagic.com/issues/show_bug.cgi?id=4253
Those two bugs look almost identical, I think they should be combined...
-Steve
|
March 08, 2011 Re: Struct constructor and opCall confussion | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steven Schveighoffer | El 08/03/2011 13:05, Steven Schveighoffer escribió:
> On Tue, 08 Mar 2011 10:52:38 -0500, Tom <tom@nospam.com> wrote:
>
>> El 08/03/2011 05:32, bearophile escribió:
>>> Tom:
>>>
>>>> Am I missing something or is this another major bug?
>>>
>>> A major bug (that is not recognized as major, I think).
>>> I don't remember its number in bugzilla, sorry (anyone remembers it?).
>>>
>>> See also:
>>> http://d.puremagic.com/issues/show_bug.cgi?id=4053
>>>
>>> Bye,
>>> bearophile
>>
>> Think I found it:
>>
>> http://d.puremagic.com/issues/show_bug.cgi?id=4253
>
> Those two bugs look almost identical, I think they should be combined...
>
> -Steve
I agree. They should be combined into a major (severity) bug.
|
March 08, 2011 Re: Struct constructor and opCall confussion | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steven Schveighoffer | Steven Schveighoffe:
> Those two bugs look almost identical, I think they should be combined...
Right, they look similar. I have linked each with the other, so if one gets fixed it's very easy to see if the fix fixes the other too. One bug has 4 votes and one bug 1 vote.
Bye,
bearophile
|
Copyright © 1999-2021 by the D Language Foundation