[Issue 8723] Error: function called with argument types:

2012-10-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8723


Andrej Mitrovic  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||andrej.mitrov...@gmail.com
 Resolution||INVALID


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


[Issue 8723] Error: function called with argument types:

2012-09-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8723


Maxim Fomin  changed:

   What|Removed |Added

   Severity|normal  |enhancement


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


[Issue 8723] Error: function called with argument types:

2012-09-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8723



--- Comment #5 from Jonathan M Davis  2012-09-25 13:10:26 
PDT ---
And why on earth would you _need_ a prototype? This isn't C. We're not forced
to declare functions higher up in a file before using them. Ideally, prototypes
wouldn't even _exist_. They're an artifact of C's poor compilation model.

Unfortunately, they're necessary for .di files, so we have them, but there's no
reason whatsoever to be declaring a prototype in a .d file.

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


[Issue 8723] Error: function called with argument types:

2012-09-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8723


bearophile_h...@eml.cc changed:

   What|Removed |Added

 CC||bearophile_h...@eml.cc


--- Comment #4 from bearophile_h...@eml.cc 2012-09-25 12:12:49 PDT ---
According to D specs I think there are no bugs here. So at best those are two
enhancement requests.

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


[Issue 8723] Error: function called with argument types:

2012-09-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8723



--- Comment #2 from Maxim Fomin  2012-09-25 11:35:45 PDT 
---
(In reply to comment #1)
> Why is that clearly a bug? You gave two functions with identical function
> signatures. The only time that you give function prototypes in D are when
> you're _not_ providing the source (e.g. inside of .di files or version(D_Ddoc)
> blocks).

No, I gave one function prototype (declaration) and one function definition
with similar name and type. The former has to be binded to the latter. This is
how C works and D should follow it in this regard. There is no reason for
assuming that prototypes and definitions are separated between different
modules and no reason for making feigned ambiguity between function body and
its own declaration.

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


[Issue 8723] Error: function called with argument types:

2012-09-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8723



--- Comment #3 from Maxim Fomin  2012-09-25 11:37:57 PDT 
---
By the way, following code is not compiled either (for the same reason):

struct S;

struct S {}

void main()
{

}

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


[Issue 8723] Error: function called with argument types:

2012-09-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8723


Jonathan M Davis  changed:

   What|Removed |Added

 CC||jmdavisp...@gmx.com


--- Comment #1 from Jonathan M Davis  2012-09-25 09:51:18 
PDT ---
Why is that clearly a bug? You gave two functions with identical function
signatures. The only time that you give function prototypes in D are when
you're _not_ providing the source (e.g. inside of .di files or version(D_Ddoc)
blocks).

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