[Issue 3231] Function declared to return a type with its same name doesn't compile

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Aug 6 17:22:42 PDT 2009


Jarrett Billingsley <jarrett.billingsley at gmail.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |jarrett.billingsley at gmail.c
                   |                            |om
         Resolution|                            |INVALID

--- Comment #3 from Jarrett Billingsley <jarrett.billingsley at gmail.com>  2009-08-06 17:22:42 PDT ---
Name lookup in D is simple: it starts with the scope in which the name is used,
and moves outward until it finds a symbol of that name, regardless of how the
symbol is used.  The function 'Bar' is inserted into Foo's namespace before its
return type is resolved.  When the return type is resolved, it finds the
function Bar() itself instead of the class Bar at module scope, and you get an

Marking this as invalid unless it can be proven otherwise.

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