[Issue 5274] Impure function call inside impure function nested inside pure function

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 24 19:08:01 PST 2010


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


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug at yahoo.com.au
         Resolution|                            |INVALID


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2010-11-24 19:06:38 PST ---
(In reply to comment #0)
> This D2 code is formally correct because bar() is never called:

No, the code is incorrect.
The error message occurs because bar() cannot be compiled.
Think about it -- its mangled name must have 'pure' in it.

The fact that there's no way that the function can actually be called, is
irrelevant: it was marked as pure, but it violates pure.

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