[Issue 10506] Purity should not be checked in a mixin statement

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jul 1 05:29:08 PDT 2013


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



--- Comment #4 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-07-01 05:29:06 PDT ---
(In reply to comment #3)
> This is issue 6169, which was fixed a while ago.  I don't know what compiler
> version you were using but I double-checked the source and it calls
> ctfeSemantic like it should.
> 
> *** This issue has been marked as a duplicate of issue 6169 ***

Let's try this:

-----
import std.string;

void test() pure
{
     mixin(["int ", "x;"].join());
}

void main() {}
-----

2.061: ok
2.062: Error: pure function 'test' cannot call impure function 'join'
2.063: Error: pure function 'test' cannot call impure function 'join'
2.064: ok (but I think this is because join has become pure?)

Note that the test-case in Issue 6169 works in all of these compilers, but not
the sample I gave.

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