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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jul 1 06:03:14 PDT 2013


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



--- Comment #6 from yebblies <yebblies at gmail.com> 2013-07-01 23:03:13 EST ---
(In reply to comment #4)
> 
> 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.

Ah, I think I know what's going on.  Does it possibly work in 2.063 when not
using ufcs?  I think it's only getting the direct calls to semantic, but some
others are being missed (eg resolveProperties)

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