[Issue 1570] Wrong return for address operator

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 28 12:50:56 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=1570


Stewart Gordon <smjg at iname.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid

Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla at digitalmars.com


--- Comment #5 from Stewart Gordon <smjg at iname.com> 2011-06-18 02:59:01 PDT ---
(In reply to comment #4)
> It seems to me that sample code is valid.
> Because dmd frontend has v.a as DotTypeExp explicitly and keeps its
> information,

a is not a member of v.  So the expression is invalid.  Unless you can find
something in the spec that states otherwise.

> then resolve overloads of f as A.f.
> Therefore v.a.f should call A.f is right (but not documented) behavior.
> -> Remove 'accepts-invalid' from keywords.

How can a case of the compiler accepting something that the spec doesn't allow
be neither accepts-invalid nor a spec issue?

--- Comment #6 from Walter Bright <bugzilla at digitalmars.com> 2011-06-28 12:45:57 PDT ---
v.a is supposed to work, and it means look up the name in the scope of the base
class a.

-- 
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